#DateForumTypeThreadPost
3309 Feb 2015 @ 02:09 PSTDatabaseReplyNeed query for this..Hi, I can think of something like below. Let me know if it fits in your requirement Sel Batchid , start_dt, case when (Max(Start_dt ) OVER ( partition by batchid order by start_dt asc r...
3204 Mar 2014 @ 11:46 PSTAnalyticsReplyWhy FastLoad Does not support NUSI ?there are 2 ways either request source team to send in one format. if this is not possible then load it as varchar column in a temp table once loaded then based on number of characters cast and lo...
3101 Jan 2013 @ 10:27 PSTDatabaseReplyChecking sequence of numbers and populate a flag if number is out of sequencejust ensure the table has not duplicate records like.. Either define the table as SET which will have CPU-I/O overhead for duplicate row check Or before executing above query check duplicates by ...
3001 Jan 2013 @ 10:27 PSTDatabaseReplyChecking sequence of numbers and populate a flag if number is out of sequencejust ensure the table has not duplicate records like.. Either define the table as SET which will have CPU-I/O overhead for duplicate row check Or before executing above query check duplicates by ...
2901 Jan 2013 @ 10:22 PSTDatabaseReplyChecking sequence of numbers and populate a flag if number is out of sequenceHi.. Hope below query helps you out.. sel Serial_Number, Send_Date , Count(*)  as File_Count , Case When ( Max_Seq - Min_Seq ) + 1 = File_Count Then ' No'  Else 'YES...
2815 Nov 2012 @ 10:07 PSTDatabaseReplySpool space error in collect stats Hi, We also encounter this issue.Generally the tablesize will be more than the spool space allocated to Profile of the Batch user-id.Either reduce the table size by moving old data to histor...
2707 Aug 2012 @ 12:08 PDTGeneralReplyCompression value Limit in TD12 Hi, I am doing compression on a table in TD13.10. How to compress the value which has single quote in it. The value is   SAINSBURY'S S/MKT  and the colum...
2626 Dec 2011 @ 08:47 PSTAnalyticsReplyHow to replace null date value with varchar Hi, you can use below syntax for your requirement.. CASE WHEN CAST(RUNDATE AS VARCHAR(10) ) IS NULL THEN 'N/A' Else CAST(RUNDATE AS VARCHAR(10) ) End hope this solves your pr...
2527 Nov 2011 @ 10:47 PSTGeneralReplyMany left joins in a query May be you can use the work tables to join other tables in one sql and use that in final sql for joining with table A. I have used same type of strategy when I have some repeating joins...
2410 Aug 2011 @ 09:27 PDTDatabaseReplyClarification in Global Temporary Tableseach session will have it's own data.In GTT data will not be shared across sessions.
2310 Aug 2011 @ 01:55 PDTDatabaseReplycase statementMay be you can try something like below sel Coalesce ( CMN.accid ,PMN.Accid) as ACCID, CASE when CMN.accid is null and PMN.Accid is not null then 'Closed' when CMN.accid is not null and PM...
2202 May 2011 @ 11:00 PDTGeneralTopicCompression value Limit in TD12Hi, I am trying to compress a column databasename which is defined as CHAR(30). As a limit specified by teradata that it can compress upto 255 values. I had put the script as Alter table TES...
2125 Apr 2011 @ 08:57 PDTUDAReplyCASE Statementbest way i think is define a table which will have all 7 columns (FCF01 to FCF07) along with other columns.So this will be master table. Then do a Insert into sel other columns,FCF01 from ; ...
2031 Mar 2011 @ 10:50 PDTDatabaseReplyLinux - Bteq - Export data to file - How can I remove the extra spaces?use trim in the sql to avoid the extra spaces. I think the column which you are trying to export in file is integer. hope this works.
1916 Jun 2010 @ 07:15 PDTDatabaseReplyCASE functionHi, If the column defined as the CHAR.Then you have to use TRIM and then use char_lenght or CHAR function to get the length.Hope this works. regards, Rupesh
1823 May 2010 @ 08:54 PDTDatabaseReplyNeed help in Optimizing query to fix spool space issueHi John, What is the primary index for table PRODUCTION.Acct_Prty_Loc_Hist . Please paste the DDL for the tables.Also the approx rowcount. Also If you can create the temp table then TMP_addr1...
1716 Mar 2010 @ 03:30 PDTGeneralReplyMultiLoad Error: UTY0805 RDBMS failure, 2644: No more room in database personnel.Hi, I think the problem is in update query. It is taking lot of spool space and you are getting this error.Instead of update try to do a SELECT and check whether you get the same error. regard...
1619 Jan 2010 @ 10:34 PSTDatabaseReplyfast load errorHi,yes the input file is incorrect.Particularly the record number 11.See the number of fields in this record and the number of fields expected by you.It is always good to check number of fields in ...
1508 Jan 2010 @ 02:37 PSTToolsReplyCase Statement in Fast Export Utility Scripthi,use the CHAR function instead of LENGTH.LENGTH is teradata extension.select (CASE WHEN CHAR(trim(cast(BASE.Link_Prof_center_Hie_cd as CHAR(10))))= 4 THEN '000'||Trim(BASE.Link_Prof_center_Hie_cd...
1407 Jan 2010 @ 09:01 PSTUDAReplyneed help - list of 'constant' values in a joinHi,You can create volatile table to store these values and then use in your query.
1307 Jan 2010 @ 01:36 PSTDatabaseReplyhow to export file to unixHi,You can use below to set the width so the text will not be cut in middle of word.SET WIDTH 3000 ;.SET TITLEDASHES OFF;hope this will work.
1205 Jan 2010 @ 10:20 PSTDatabaseReplyTo select columns as rows from a tableHi ,You can achieve this by following query.But if columns are increased then the query will be lenghty.If you send the exact requirement and table structure query can be changed.I have done in fol...
1120 Dec 2009 @ 10:42 PSTDatabaseReplyInsterting CSV File data into a tera data tablehi,You can refer to solutionhttp://www.teradata.com/teradataforum/Topic17627-1-1.aspxLet me know if this solves your problem
1020 Dec 2009 @ 10:40 PSTUDAReplyNeed help loading dataHi,I have not understood your question.You are saying1)"I am trying to insert multiple files that are in csv format into one tera data table..." if you want to insert into one table then This ca...
914 Dec 2009 @ 08:24 PSTDatabaseReplywhat is difference between read lock and accesslock?Hi,Access lock is one wherein the table is not locked means you can do insert/update/delete on the table while access lock will access the table ,in this the dirty reads may happen means you will n...

Pages