#DateForumTypeThreadPost
1208 Mar 2011 @ 01:20 PSTDatabaseReplyUsing QUALIFY and GROUP BY together gives 3504 ERROR: SELECTED NON-AGGREGATE VALUES MUST BE PART OF THE ASSOCIATED GROUP???Hi, When i try to execute the below query , i get 3504 error: SELECT a, TRIM(b) AS b, c, TRIM(d) AS d GROUP BY 1,2,3,4 FROM db1.tbl1 ...
1113 Sep 2010 @ 11:51 PDTDatabaseReplyObtaining a Create Table Text String Using the DBC Only.What is the purpose of you creating the DDL? If you want to extract the DDLs of a particular db to a file, you can do the following. SELECT DATABASENAME, TABLENAME, 'SHOW TABLE ' || TRIM(DAT...
1027 Apr 2010 @ 03:27 PDTDatabaseReplyAJI not getting invokedAll, Please find below the AJI and view definitions and the query which is causing problem and let me know your inputs. CREATE JOIN INDEX JI_ADHOC AS SELECT Month_Year, Product_Id, D5...
918 Apr 2010 @ 09:42 PDTDatabaseReplyDifference Between Drop & Disabling the IndexI am not sure we have the facility to disable indexes. Drop and recreate Index works fine. We use this strategy when we insert data into existing tables which has huge volume of data. Loading w...
829 Jan 2010 @ 03:39 PSTDatabaseReplyAJI not getting invokedIs this because we are trying to run a SQL with consolidated views ConV1, ConsV2 on the Fact FV1?Is this a bug in Teradata?advise,Thanks,Toad
727 Jan 2010 @ 12:12 PSTDatabaseReplycreate table as (select.... takes long timeHi,If the target table is a SET table then insertion could take time as SET tables checks for duplicates and eliminates duplicates while insertion. This could take time.Additional factors might be:...
624 Jan 2010 @ 11:48 PSTDatabaseTopicAJI not getting invokedHi All,We had created a aggregate join Index using the tables.Fact1, Dim1, Lkp1, Dim2, Lkp2FV1, DV1, LV1, DV2, LV2 are respective simple SELCT * views created on top of the tables.AlsoA view ConsV1...
507 Sep 2009 @ 04:54 PDTDatabaseReplyDesign IssueThe thumb rule is PI: It is used for data distribution. PI can be decided based on Frequency of usage in Where Clause columns (either it could be surrogate key / natural key)If the non-unique colum...
401 Sep 2009 @ 04:35 PDTUDAReplyLast updated date and time of any table in TeradataHi Hardik,Try this...SELECT TABLENAME, LASTALTERTIMESTAMP FROM DBC.TABLES-- WHERE DATABASENAME = 'MYDB' -- OPTIONALORDER BY LASTALTERTIMESTAMP DESCThanks,Toad
301 Sep 2009 @ 01:27 PDTDatabaseReplyTRIM/DROP non-printable trailing CHARACTERSThanks Jimm,I had modified your query to check if there is any of the unwanted characters exists at any position of the column.SELECT MyVarCol, CHAR2HEXINT(MyVarCol) , INDEX(MyVarCol, '00'XC ) AS...
231 Aug 2009 @ 01:04 PDTDatabaseReplyTRIM/DROP non-printable trailing CHARACTERSHi,We are having a similar issue. I tried to check the actual value using char2hexint function.SEL val1, CHAR2HEXINT(val1) AS char2hexint_val1FROMmytable;val1 char2hexint_val19 3900The value below...
104 Aug 2009 @ 06:32 PDTUDAReplyto get datatypes of all column from tableHELP TABLE tblname will also give the details of each column in the same order as in the table DDL.Hope this helps.