Why I do not see all the databases in Teradata Studio - response (11) by...
fgimmer, Thanks for sharing a great peace of info :)
View ArticleSQL to transpose (row to column) any level (nth level) of data - forum topic...
Hi, I have a data like below: Tgt Src lvl L3_Tab1.Col1 L2_Tab1.Col3 0 L3_Tab1.Col2 L2_Tab2.Col2 0 L3_Tab1.Col3 L2_Tab2.Col3 0 L3_Tab1.Col4 L2_Tab2.Col1 0 L2_Tab1.Col3 L1_Tab3.Col1 1 L2_Tab1.Col3...
View ArticleSQL to transpose (row to column) any level (nth level) of data - response (1)...
Source Data Tgt Src lvl L3_Tab1.Col1 L2_Tab1.Col3 0 L3_Tab1.Col2 L2_Tab2.Col2 0 L3_Tab1.Col3 L2_Tab2.Col3 0 L3_Tab1.Col4 L2_Tab2.Col1 0 L2_Tab1.Col3 L1_Tab3.Col1 1 L2_Tab1.Col3 L1_Tab1.Col1 1...
View ArticleSQL to transpose (row to column) any level (nth level) of data - response (2)...
Hi Koushik, There is already a thread with this topic, you can consult that:http://forums.teradata.com/forum/database/transpose-rows-to-columns-0
View ArticleSQL to transpose (row to column) any level (nth level) of data - response (3)...
Hi Khurram, My question is little different. In my example there is a linkage between Src column value of lvl=0 with Tgt column value of lvl=1 Source Data Tgt Src lvl L3_Tab1.Col1 L2_Tab1.Col3 0...
View ArticleCan some one provide the solution for the below scenario? - response (50) by...
Hi saikandimalla I am not sure if insert statements given by you are right . Below query will work for the results that you want . SEL cust_id, src_id , branch, month_end_date, MAX(MTD) ,...
View ArticleSQL to transpose (row to column) any level (nth level) of data - response (5)...
Here is your solution. I am placing full code so other gurus can correct it if one finds error or better solution. CREATE TABLE myDB.SrcTgtMap ( TgtCol VARCHAR(100), SrcCol VARCHAR(100), Lvl INTEGER )...
View ArticleSkewed Query - forum topic by ciw916
I seem to be having trouble with a query that I inherited from another developer. I'm told this is running a 99% skew. Would anybody be able to tell me what looks so skewed about this table? create...
View ArticleSkewed Query - response (1) by Qaisar Aftab Kiani
The index of the target table seems to be different and could be very non-unique. Check the uniqueness of the columns for the target table you identified as PI, how much non-unique they are?
View ArticleBteq script - error handling not working, need help - response (3) by s@ir@m
using BTEQ Script, any changes (insert/update/delete)-how to get ACTIVITYCOUNT every changes how to get TABLE ACTIVITYCOUNT ?
View ArticleMacro Metadata Log Table - response (4) by nevermore
Hi again, by the way I used TD 13.0 . I've check the table DBC.DBQLObjTbl where objecttype = 'Mac' , but I saw this table keeps logs up to one week before. How can I find the all past log, or do I?
View ArticleBteq script - error handling not working, need help - response (4) by M.Saeed...
Hi, You can use the below template to handle errors, while activity count is writted to log file based on the type of statement (Insert, Update, Delete) SELECT 'STARTDTTM' AS A, CURRENT_TIMESTAMP;...
View ArticleSkewed Query - response (2) by M.Saeed Khurram
Hi, Can you please share the definitions of both the source tables? Or at least the Primary index information? Also share the row count of both the tables.
View ArticleUnable to grant certain privs using sproc - error 3524 - forum topic by...
I've created a stored procedure to grant certain privs but I get error 3524 for some of them. I've created the sproc and am owner and creator. I'm creator of the target db. I can grant the privs...
View ArticleMacro Metadata Log Table - response (5) by tomnolan
DBQL tables fill up rapidly and can grow quite large, so most customers have automated procedures in place to archive and delete old records from DBQL tables. You would have to work with the person in...
View ArticleBteq script - error handling not working, need help - response (5) by s@ir@m
Thanks Khurram, i need another script, i have a job_status,target tables based upon the target loading depends upon job_status table i want first check with job_status table (it's already loading...
View ArticleMacro Metadata Log Table - response (6) by Raja_KT
Hi, Maybe you can just filter out what you want in another table. By the way, if you can share the objective and ideas or the reason why you are doing this(only macro maybe), then others can give or...
View ArticleBteq script - error handling not working, need help - response (6) by Raja_KT
Hi Ratnam, Can you try with this: select fields you want where tablename='target' and date='your date' and status='your status' then check the activity count for the above. .if activitycount <> 0...
View ArticleMacro Metadata Log Table - response (7) by nevermore
we've so many tables and everyday we upsert this tables with their own macros and keeping history. One macro can sometimes be run twice or more . sometime later, when I check the data I can see...
View Article