#DateForumTypeThreadPost
2430 Jul 2010 @ 09:02 PDTDatabaseTopicHierarchy Query Help Hi , I have a source table with two columns and i need the result in a single column as follows :- Source Table :- OLDID NEWID -------- -------- 123 234 234 345 345 456 123 56...
2325 May 2010 @ 10:33 PDTDatabaseReplyHow to extract column names from a table using Teradata SQLTry something like this... SELECT ColumnName FROM DBC.Columns WHERE DatabaseName='Demo' AND TableName='Temp1'; OR SELECT FieldName FROM DBC.TVFIELDS WHERE TABLEID = (SELECT TVMI...
2204 Sep 2009 @ 01:06 PDTDatabaseReplyhow get view from a field nameTry any of these query with the correct Column Name...SELECT T.DatabaseName, T.TableNameFROM DBC.Columns C, DBC.Tables TWHERE C.TableName=T.TableNameAND C.DataBaseName=T.DataBaseNameAND T.TableKi...
2103 Sep 2009 @ 02:03 PDTDatabaseReplyCount&Sub CountTry something like this...SELECT CompId, CompName, COUNT(COALESCE(CompValue,1)) TotalCount, TotalCount - COUNT(CompValue) NullCount, ((TotalCount - NullCount) (Decimal(5,2))) /TotalCount *100 Pe...
2011 Aug 2009 @ 10:53 PDTDatabaseReplySQL Left Join questionGuess this could be viewed better - The basic syntax for a two-table OUTER JOIN follows: SELECT [table-name.]column-name […,table-name2.]column-name FROM table-name [AS alias-name] ...
1911 Aug 2009 @ 10:46 PDTDatabaseReplySQL Left Join questionHi, The basic syntax for a two-table OUTER JOIN follows: SELECT [.] […,.] FROM [AS ] {LEFT | RIGHT | FULL} [OUTER] JOIN [AS ] ON [.] = [.] [ WHERE ] ; No Join Operators: "(+)" or ...
1824 Jul 2008 @ 02:20 PDTDatabaseReplyNeed to convert a TimeStamp column value to Simple Date FormatYes, you can use the FORMAT.Eg. SELECT CAST(current_timestamp as DATE FORMAT 'YYYYMMDD')It is better to try in BTEQ rather than trying in SQL Assistant.Regards,Mm
1716 Jun 2008 @ 05:56 PDTDatabaseReplyIs there any query which will tell me.....In the like clause pass the databaseName.TableNameEg.: '%DatabaseName.TableName%'
1616 Jun 2008 @ 05:53 PDTDatabaseReplyIs there any query which will tell me.....Try this...SELECT *FROM (SELECT QueryID, UserName FROM DBC.qrylog) QL, (SELECT QueryID, SQLTextInfo FROM DBC.QrylogSql WHERE SQLTextInfo like ' ') QLSWHEREQL.QueryId= QLS.QueryId;
1521 May 2008 @ 06:29 PDTDatabaseTopicIdentify User - Deleted RecordsHi All,Is there any way to Identify the User who performed "Delete" operation on a Particular Table. I have tried in the QueryText Column of the DBC.QryLog, but it displays only the last two days o...
1406 May 2008 @ 05:59 PDTToolsTopicUtility ErrorHi all,Iam getting the following error while executing Fastload/BTEQ Script under UNIX:ld.so.1: fastload: fatal: /opt/lib/../libcliv2.so: wrong ELF class: ELFCLASS64KilledKindly help me how to reso...
1318 Oct 2007 @ 08:49 PDTDatabaseReplyFastload Fixed Length ProblemHope this will be clear now...The metadata defined as 100bytes(say for example some 20 fields with integer,varchar & date datatypes). There are no delimiters. Not all the records fits with in the m...
1218 Oct 2007 @ 03:09 PDTDatabaseTopicFastload Fixed Length ProblemHi All,Im having varying record width - fixed length file. For Instance the Fixed width length is 100 bytes(as per the data structure) but there are many records lesser than 100bytes(width) in the...
1120 Aug 2007 @ 09:36 PDTDatabaseTopicFast Load - Comma Problem within FieldHi all,Im having comma delimited flat file, one of the field(Address field - Varchar(30)) has some commas on it, Since there are commas, the address field is chopped and moved to the adjacent fiel...
1016 Aug 2007 @ 12:51 PDTDatabaseReplyFastload File formatThanks joed
909 Aug 2007 @ 12:07 PDTDatabaseTopicFastload File formatHi All,I have a delimited flat file in the following format, strings are enclosed with in parenthesis. Is it possible to load to the target by chopping the parenthesis(without modifying the source ...
805 Aug 2007 @ 12:58 PDTDatabaseReplyHow to find the number of columns in a table?Thanks for ur query
703 Aug 2007 @ 05:21 PDTDatabaseTopicHow to find the number of columns in a table?Hi All,Please help me to find the count of columns in a table.Thanks & Regards,Md. Siddique
602 Aug 2007 @ 06:28 PDTDatabaseReplyHow to Find the Version/Release of TeradataThanks, it works!
501 Aug 2007 @ 05:48 PDTDatabaseTopicHow to Find the Version/Release of TeradataHi,I would like to find out the version/release of Teradata im using, kindly advice how to find out.Thanks & Regards
429 Jun 2007 @ 05:14 PDTDatabaseTopicCertification Practice TestHi ALL,Iam looking for some Teradata practice test sites other than Teradata and CoffingDW, Kindly advise me.Warm Regards,Meem
320 May 2007 @ 11:36 PDTDatabaseReplyQuery HelpHi Mitrich,Your script works!! I cant implement it bcoz i dont hav the rights to INSERT any new rows, can you advise please? Regards.
220 May 2007 @ 08:47 PDTDatabaseReplyQuery HelpHi Mitrich,Thanks for your reply!It did worked but im in need of a Delete query which would produce the result similar to the one you mentioned.Regards
120 May 2007 @ 02:52 PDTDatabaseTopicQuery HelpHi All,I would like to eliminate duplicates and make the following table with unique records. I wish to have a query to solve such issues.TableName : EMPLOYEEEMPID EMPNAME EMPSSN*******************...