24 | 30 Jul 2010 @ 09:02 PDT | Database | Topic | Hierarchy 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... |
23 | 25 May 2010 @ 10:33 PDT | Database | Reply | How to extract column names from a table using Teradata SQL | Try something like this...
SELECT ColumnName
FROM DBC.Columns
WHERE DatabaseName='Demo'
AND TableName='Temp1';
OR
SELECT FieldName
FROM DBC.TVFIELDS WHERE TABLEID =
(SELECT
TVMI... |
22 | 04 Sep 2009 @ 01:06 PDT | Database | Reply | how get view from a field name | Try 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... |
21 | 03 Sep 2009 @ 02:03 PDT | Database | Reply | Count&Sub Count | Try something like this...SELECT CompId, CompName, COUNT(COALESCE(CompValue,1)) TotalCount, TotalCount - COUNT(CompValue) NullCount, ((TotalCount - NullCount) (Decimal(5,2))) /TotalCount *100 Pe... |
20 | 11 Aug 2009 @ 10:53 PDT | Database | Reply | SQL Left Join question | Guess 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]
... |
19 | 11 Aug 2009 @ 10:46 PDT | Database | Reply | SQL Left Join question | Hi,
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 ... |
18 | 24 Jul 2008 @ 02:20 PDT | Database | Reply | Need to convert a TimeStamp column value to Simple Date Format | Yes, 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 |
17 | 16 Jun 2008 @ 05:56 PDT | Database | Reply | Is there any query which will tell me..... | In the like clause pass the databaseName.TableNameEg.: '%DatabaseName.TableName%' |
16 | 16 Jun 2008 @ 05:53 PDT | Database | Reply | Is 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; |
15 | 21 May 2008 @ 06:29 PDT | Database | Topic | Identify User - Deleted Records | Hi 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... |
14 | 06 May 2008 @ 05:59 PDT | Tools | Topic | Utility Error | Hi 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... |
13 | 18 Oct 2007 @ 08:49 PDT | Database | Reply | Fastload Fixed Length Problem | Hope 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... |
12 | 18 Oct 2007 @ 03:09 PDT | Database | Topic | Fastload Fixed Length Problem | Hi 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... |
11 | 20 Aug 2007 @ 09:36 PDT | Database | Topic | Fast Load - Comma Problem within Field | Hi 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... |
10 | 16 Aug 2007 @ 12:51 PDT | Database | Reply | Fastload File format | Thanks joed |
9 | 09 Aug 2007 @ 12:07 PDT | Database | Topic | Fastload File format | Hi 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 ... |
8 | 05 Aug 2007 @ 12:58 PDT | Database | Reply | How to find the number of columns in a table? | Thanks for ur query |
7 | 03 Aug 2007 @ 05:21 PDT | Database | Topic | How 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 |
6 | 02 Aug 2007 @ 06:28 PDT | Database | Reply | How to Find the Version/Release of Teradata | Thanks, it works! |
5 | 01 Aug 2007 @ 05:48 PDT | Database | Topic | How to Find the Version/Release of Teradata | Hi,I would like to find out the version/release of Teradata im using, kindly advice how to find out.Thanks & Regards |
4 | 29 Jun 2007 @ 05:14 PDT | Database | Topic | Certification Practice Test | Hi ALL,Iam looking for some Teradata practice test sites other than Teradata and CoffingDW, Kindly advise me.Warm Regards,Meem |
3 | 20 May 2007 @ 11:36 PDT | Database | Reply | Query Help | Hi Mitrich,Your script works!! I cant implement it bcoz i dont hav the rights to INSERT any new rows, can you advise please? Regards. |
2 | 20 May 2007 @ 08:47 PDT | Database | Reply | Query Help | Hi 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 |
1 | 20 May 2007 @ 02:52 PDT | Database | Topic | Query Help | Hi 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*******************... |