#DateForumTypeThreadPost
9630 Aug 2007 @ 05:57 PDTDatabaseReplyTables to Views Cross ReferenceEasiest 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...
9530 Aug 2007 @ 05:54 PDTAnalyticsReplyConcatenate 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...
9430 Aug 2007 @ 05:30 PDTAnalyticsReplyhow to compute the kpi using sqlI believe Teradata Window Based function can address your problem.Look up for OLAP functions in SQL reference manuals.Thanks,Vinay Bagare
9330 Aug 2007 @ 05:24 PDTUDAReplyTable Fields DataOne 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...
9230 Aug 2007 @ 05:20 PDTAnalyticsReplycan files be created from viewsI 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
9130 Aug 2007 @ 05:17 PDTToolsReplyImport in TD SQL AssistantI believe you will have to remove the column header information from the file that you intend to load. Thanks,Vinay Bagare
9030 Aug 2007 @ 05:11 PDTToolsReplySQL assistant vs BTEQBesides 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...
8902 Aug 2007 @ 02:15 PDTDatabaseReplyError: No more room in database DBCI 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
8821 Jun 2007 @ 10:10 PDTDatabaseReplySample without duplicatesUse this insteadselect * from testqualify rank() over (partition by deptno order by deptno) = 1 -- one random row per deptsample 3Thanks,Vinay
8712 May 2007 @ 12:41 PDTToolsReplyWhere 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...
8612 May 2007 @ 12:37 PDTToolsReplyMissing recordsIf 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...
8519 Apr 2007 @ 01:18 PDTToolsReplyNeed to read date field from table in BTEQActually 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...
8430 Mar 2007 @ 08:24 PDTDatabaseReplyMasking commas within a macro parameterI 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...
8330 Mar 2007 @ 08:20 PDTDatabaseReplyCalculate age from birth dateTry 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...
8227 Mar 2007 @ 01:43 PDTUDAReplyHow 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 ...
8127 Mar 2007 @ 01:38 PDTToolsReplyBTEQ examplesComment 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 ...
8006 Mar 2007 @ 11:50 PSTUDAReplyhow to extract only mondays in 2007You 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
7917 Jan 2007 @ 01:57 PSTUDAReplyAWTI believe V2R7 will have AWT information available in Teradata manager. Stay tuned!! Vinay
7809 Jan 2007 @ 10:29 PSTToolsReplyAny Tips for loading Excel spreadsheet from end-user client workstationMS Access may be a good option too as you could link Teradata tables.Vinay
7727 Dec 2006 @ 09:20 PSTDatabaseReplycreate macro issuesOne more comment on MACRO.Macros are always an explicit transaction. Either ALL commit or rolled back.Vinay
7625 Dec 2006 @ 06:39 PSTToolsReplyRemoving '.' (dot) from input stringTry 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
7520 Dec 2006 @ 10:24 PSTToolsReplyuty4015 error encountered - uploading text file thru multiloadAccess 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...
7420 Dec 2006 @ 10:18 PSTDatabaseReplySQL optimization helpUse 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...
7320 Dec 2006 @ 09:55 PSTDatabaseReplyaltering column attributesThere 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...
7213 Nov 2006 @ 12:27 PSTDatabaseReplyCapturing 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...

Pages