96 | 30 Aug 2007 @ 05:57 PDT | Database | Reply | Tables to Views Cross Reference | Easiest of all (manual) is to right click the view in Teradata administrator and select references. It should list all the objects that are being used in the underlying view.For purpose of automati... |
95 | 30 Aug 2007 @ 05:54 PDT | Analytics | Reply | Concatenate Vertically? | BS,Try this SELECTMAX(CASE WHEN CNT =1 THEN val ELSE ' ' END ) || MAX(CASE WHEN CNT =2 THEN ',' || val ELSE ' ' END ) || MAX(CASE WHEN CNT =3 THEN ',' || val ELSE ' ' END ) || MAX(CASE WHEN CN... |
94 | 30 Aug 2007 @ 05:30 PDT | Analytics | Reply | how to compute the kpi using sql | I believe Teradata Window Based function can address your problem.Look up for OLAP functions in SQL reference manuals.Thanks,Vinay Bagare |
93 | 30 Aug 2007 @ 05:24 PDT | UDA | Reply | Table Fields Data | One way of doing this ..Extract SHOW PROCEDURE to a flat file.Load this into a Teradata table using BTEQ.Use POSITION function to find for the string in the table that you just loaded. For matches... |
92 | 30 Aug 2007 @ 05:20 PDT | Analytics | Reply | can files be created from views | I believe you could have 64 joins that TD RDBMS can perform (I have never seen anything above 10).That means you could potentially have 64 views used in a view DDL.Thanks,Vinay Bagare |
91 | 30 Aug 2007 @ 05:17 PDT | Tools | Reply | Import in TD SQL Assistant | I believe you will have to remove the column header information from the file that you intend to load. Thanks,Vinay Bagare |
90 | 30 Aug 2007 @ 05:11 PDT | Tools | Reply | SQL assistant vs BTEQ | Besides Very useful information provided by Jim..BTEQ can be run in a batch mode for exportin,importing (small volumes of data).I can also be used to run useful reports. It can be installed both on... |
89 | 02 Aug 2007 @ 02:15 PDT | Database | Reply | Error: No more room in database DBC | I also believe that some of the tables have pretty bad indexes.You may want to account for this skewness when you move space.Thanks,Vinay Bagare |
88 | 21 Jun 2007 @ 10:10 PDT | Database | Reply | Sample without duplicates | Use this insteadselect * from testqualify rank() over (partition by deptno order by deptno) = 1 -- one random row per deptsample 3Thanks,Vinay |
87 | 12 May 2007 @ 12:41 PDT | Tools | Reply | Where do the Log files get created? | Also check if the user is attached to any profile.If yes, check if there is a default database mentioned in the profile (DBC.ProfileInfo).If yes, profile level settings will take precedence over us... |
86 | 12 May 2007 @ 12:37 PDT | Tools | Reply | Missing records | If all error tables are dropped by MLOAD, I only suspect that you have one of the following optionsIGNORE DUPLICATE INSERT ROWSIf you want to check this, you may want to remove this option from you... |
85 | 19 Apr 2007 @ 01:18 PDT | Tools | Reply | Need to read date field from table in BTEQ | Actually you could accomplish this within a single script as below via .OS command.export report file = export_file_nameSelect ****FROM *,*,*,*,control_table WHEREcust_date between Control_table.ru... |
84 | 30 Mar 2007 @ 08:24 PDT | Database | Reply | Masking commas within a macro parameter | I had written a stored procedure to process parameters few months back.I have not maintained this for a while, but may be a good starting point.REPLACE PROCEDURE sysdba.PR_Process_Parm (IN var1 VA... |
83 | 30 Mar 2007 @ 08:20 PDT | Database | Reply | Calculate age from birth date | Try thisSEL (CURRENT_DATE - CAST(DOB AS DATE))/365 (TITLE 'Years'),((CURRENT_DATE - CAST(DOB AS DATE)) MOD 365 ) /30 (TITLE 'Months')FROM EDW_DBA_DB.TEST;One assumption here I have made is all m... |
82 | 27 Mar 2007 @ 01:43 PDT | UDA | Reply | How can I get stats recommendation from Explain? | As explained by all you could do that. Otherwise you could use the following bteq example.RUN FILE /home/tddba/util/logon/logon.txt .EXPORT REPORT FILE /home/tddba/util/reports/stats.txtDIAGNOSTIC ... |
81 | 27 Mar 2007 @ 01:38 PDT | Tools | Reply | BTEQ examples | Comment on SwathyG postWe can load fixed length data file so long as text file and the column length are in sync.For Swathy_Teradata postuse .SET ERROROUT STDOUT in your bteq script.You could then ... |
80 | 06 Mar 2007 @ 11:50 PST | UDA | Reply | how to extract only mondays in 2007 | You may want to use Year_Of_Calendar instead of the BETWEEN clause. SELECT Calendar_Date FROM SYS_Calendar.Calendar WHERE Day_Of_Week = 2 AND Year_Of_Calendar = 2007 ORDER BY 1;Vinay |
79 | 17 Jan 2007 @ 01:57 PST | UDA | Reply | AWT | I believe V2R7 will have AWT information available in Teradata manager. Stay tuned!! Vinay |
78 | 09 Jan 2007 @ 10:29 PST | Tools | Reply | Any Tips for loading Excel spreadsheet from end-user client workstation | MS Access may be a good option too as you could link Teradata tables.Vinay |
77 | 27 Dec 2006 @ 09:20 PST | Database | Reply | create macro issues | One more comment on MACRO.Macros are always an explicit transaction. Either ALL commit or rolled back.Vinay |
76 | 25 Dec 2006 @ 06:39 PST | Tools | Reply | Removing '.' (dot) from input string | Try thisSEL POSITION('.' IN TRIM(STR)) AS POS,SUBSTRING(TRIM(STR) FROM 1 FOR (POS-1)) || SUBSTRING(TRIM(STR) FROM (POS + 1) FOR CHARACTER_LENGTH(TRIM(STR)))FROM ;Vinay |
75 | 20 Dec 2006 @ 10:24 PST | Tools | Reply | uty4015 error encountered - uploading text file thru multiload | Access modules errors usually showup if there is a outage of the file server from where MLOAD is reading the file. Try rerunning the job and ensure that there is connectivity to the file server.I t... |
74 | 20 Dec 2006 @ 10:18 PST | Database | Reply | SQL optimization help | Use EXPLAIN identifier before your SQL you would see "Partition Elimination" strategy. It is most effective if the range is encompasses fewer partitions. There are other overheads of PPI though, ad... |
73 | 20 Dec 2006 @ 09:55 PST | Database | Reply | altering column attributes | There are several restrictions that apply while you use ALTER TABLE.For a complete list, please refer Teradata manual SQL Reference: Data Defintiion Statements - Alter table for more information.Th... |
72 | 13 Nov 2006 @ 12:27 PST | Database | Reply | Capturing OUT parameter value from SP, from with in BTEQ ??? | I don't think BTEQ can process output parms from SP.But here's what you could do, I think it was partly postedAs was suggested you will need to use an intermediate table, instead of outputing it.Us... |