Adhoc SQL Request - forum topic by bikky6
Hi I have a scenario like the below. CREATE TABLE DT(PATH VARCHAR(20)); INSERT INTO DT VALUES('A'); INSERT INTO DT VALUES('A--->B'); INSERT INTO DT VALUES('A--->B--->C'); INSERT INTO DT...
View ArticleSystem Views DBC.COLUMNSTATS & DBC.MULTICOLUMNSTATS not existig in TD 14 -...
Thanks Fred. Yes it seems I will have to change my application code in order to use these views.
View ArticleLoading Fixed Width File using Teradata SQL Import - response (3) by...
Hi Vikas.... Thanks for the reply... Are you sure that this can not be achieved using SQL IMPORT? Because my TL told me to do that using SQL Import.
View ArticleI want to separate the full name in two parts - response (6) by 2aravinth
select name,firstname,lastname from ( select position('' in name)-1 pos, name, length(name)-pos rem, case when pos>0 then substring(name,1,pos) else name end as firstname, case when pos>0 then...
View ArticleHow to define ARRAY of varying length? - forum topic by avishekp.iem
Hi All, I need to create a ARRAY of VARCHAR(100) of varying length whose length would be defined at runtime. The requirement is to have this UDT as INPUT of a stored procedure which will be invoked by...
View ArticlePerformance consideration in Enabling LockLogger - forum topic by synpey
Hi, Is there any way to measure performance impact on existing queries with enabling LockLogger? I'm planning to enable LockLogger in continuous mode to debug deadlock queries. But I'm not sure the...
View ArticlePerformance consideration in Enabling LockLogger - response (2) by synpey
I mean "estimate", not measure.
View ArticleSQL for last year starting and ending dates - response (2) by 2aravinth
select min(calendar_date) starting, max(calendar_date) ending from sys_calendar.calendar where year_of_calendar=2013This will display the Start & End date of the year 2013
View ArticleSQL for last year starting and ending dates - response (3) by VandeBergB
The starting dates and end dates for a year are constant, why would you waste cpu cycles trying find max/min. The year always starts with January 1 and ends with December 31. If its a leap year you...
View ArticleRelation between Statistics and Indexes on a table - forum topic by...
Hi, I have created a table "product" with defination as below, CREATE SET TABLE product ,NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, CHECKSUM = DEFAULT ( product_id INTEGER,...
View ArticleBTEQ in ANSI mode - response (1) by mayya@teradataforum
Hi, Please anyone reply to my query.
View Article3707 Syntax error,expected something like a '"||"'or a 'FROM' keyword between...
Hi, I am getting the following syntax error when I am trying to run my Query: 3707 Syntax error,expected something like a '"||"'or a 'FROM' keyword between a string or a Unicode character literal and...
View ArticleData between two tables. - forum topic by samcompda
Hi, I have to use only SQL (Not-Plsql) to input to my tool and I am not sure what function to use. I have two table T1 and T2, need data from T1 for the corresponding T2 key value. Table T1 Key...
View ArticleData between two tables. - response (1) by samcompda
Tables and requried results again, Table T1 Key Description A1 Desc1 A2 Desc2 A3 Desc3 B1 Desc4 C1 Desc5 Table T2 Key Col1 q1...
View ArticleImplementing SCD type 2 using ANSI Merge in teradata - forum topic by terdatau1
Hi, I am trying to implement SCD type 2 using ANSI MERGE. Could anyone please provide a example on how to implement this. I was searching on the web and came across a article which explains SCD type 2...
View ArticleREFERENCES PRIVILEGE - forum topic by zigzagdna
I am running Teradata 14.x on SUSE UNIX, From DBC I had created a user PREMTEST3 and created some tables in PREMTEST3. Now when I add foreign key to table, it gives me error that there are no...
View ArticleGet all the counts of the tables in the particular database into a table -...
Hi I have a requirement like I need to get the tablename and their counts of a particular database into a table. I am able to count each table count individually.Can we do it in using SQL only? Regards...
View ArticleImplementing SCD type 2 using ANSI Merge in teradata - response (1) by dnoeth
Hi John, you can't do that using a single TD MERGE, you would need an INSERT plus an UPDATE for WHEN MATCHED, which is not supported. But this is exactly why TD added Temporal tables :-) Dieter
View ArticleGet all the counts of the tables in the particular database into a table -...
Hi KVB, this topic has been covered several times, you might use: a cursor plus Dynamic SQL in a Stored Procedure to get the exact count simply extract it from the stats if the count doesn't have to be...
View Article