#DateForumTypeThreadPost
2411 Sep 2013 @ 12:02 PDTDatabaseTopicADD_MONTHS vs INTERVALPlease let me know the exact difference between using INTERVAL and ADD_MONTHS SEL CAST('2013-08-29' AS DATE ) -INTERVAL '6' MONTH returns Invalid Date SEL ADD_MONTHS(CAST('...
2331 Jul 2013 @ 12:18 PDTDatabaseTopicLength function counts only trailing spaces in a stringSEL LENGTH('   VENKAT   ') I have 3 spaces before and after the name,it returns 9 as it is 12 character string. When used with CHAR_LENGTH('   VENKAT&nbs...
2228 Jul 2013 @ 11:36 PDTDatabaseTopicTime formats in Case statementsHi While I am writing the following query like SELECT CASE WHEN CURRENT_TIME >=CAST('18:00:00' AS TIME(0)) THEN 'SCHEDULED' END It is returning NULL instead of the values. &...
2118 Jul 2013 @ 10:19 PDTDatabaseTopicGet all the counts of the tables in the particular database into a tableHi 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? ...
2018 Jul 2013 @ 12:26 PDTDatabaseReplyAdhoc SQL requestThanks Muthm.It helped a lot.
1918 Jul 2013 @ 12:23 PDTDatabaseTopicAdhoc SQL RequestHi 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--...
1817 Jul 2013 @ 06:48 PDTDatabaseReplyAdhoc SQL requestMy output should look like Level0    Level1    Level2    Level3 B               ...
1717 Jul 2013 @ 06:45 PDTDatabaseTopicAdhoc SQL request 3 Replies Latest reply: Jul 17, 2013 1:44 PM by KVB <:header class=js-original-header> Adhoc sql request KVB Jul 17, 2013 11:11 AM <:section class=j-ori...
1617 Jul 2013 @ 03:18 PDTDatabaseTopicHow to find the system IP of Teradata Account Locked by another user with a usernameHi   My ID got locked by another user from the system.Can I know the way to find the pariticular system's IP address? Regards KVB
1510 Jul 2013 @ 04:24 PDTDatabaseTopicGet the count of rows in the respective tables using cursorsHi  I have a scenario like If I fired a query ,i will be getting a list of tables.In addition to that,I need to get the count of that tables. What I thought is to make use of cursors inside...
1420 Jun 2013 @ 05:08 PDTDatabaseReplyError while converting date to charThank you.
1320 Jun 2013 @ 12:43 PDTDatabaseTopicError while converting date to charI have a table with date value stored in a char(10) format CT KVB_DT(MYDATE CHAR(10)) INS INTO KVB_DT VALUES('20130620') I need to add 7 days to it and it should be in char format as 201...
1218 Jun 2013 @ 11:54 PDTDatabaseTopicREPLACE VIEW Failed. 6922: Illegal or unsupported use of subquery/derived table inside a recursive query/view. REPLACE VIEW Failed. 6922:  Illegal or unsupported use of subquery/derived table inside a recursive query/view. I have my query something like the below REPLACE RECURSIVE VIEW <DB>....
1112 Jun 2013 @ 11:42 PDTDatabaseReplyDetermine number working day between two datesHi I have created the below tables for your scenario.Let me know if it solves your purpose. CT HOL(START_DATE DATE,END_DATE DATE); INS INTO HOL VALUES('2013-06-03','2013-06-13')...
1012 Jun 2013 @ 11:22 PDTDatabaseReplytrainingHi Rajesh, It's better you go for  online trainings by any real time expert,who shares his knowledge in vast.I can refer you to make an enquiry at teradataonlinetrainings@gmail.com.T...
912 Jun 2013 @ 01:50 PDTDatabaseReplyNULLS are treated as high priority when assigned row numbers with in a groupI got it. I placed in a derived table and applied rownum and it worked out.
812 Jun 2013 @ 01:28 PDTDatabaseTopicNULLS are treated as high priority when assigned row numbers with in a groupHi   I have the below table and I am trying to assign rownumber and need to get row_number=1 for the values.But theere are NULL's in the group  where they are being treated high pri...
711 Jun 2013 @ 09:05 PDTDatabaseReplyDivision of two integersThanks Dieter.
611 Jun 2013 @ 05:56 PDTDatabaseReplyDivision of two integersOh sorry.Yes the yare decimals.Then also for the first query it is not being rounded off and for the second one it is being rounded.Here is the confusion arised for me. KVB
511 Jun 2013 @ 04:51 PDTDatabaseTopicDivision of two integersHi Below things wonder me.When I perform SEL (100.00/210.00)  GIVES 0.48 But if perform SEL (29781215.00/29894915.00)  gives 1.00 instead of  0.99 Then i did in the below way.It...
411 Jun 2013 @ 04:42 PDTToolsReplyControl characters in BTEQ output   Thanks for your inputs.I got the below output.     EMPNO  ENAME                 GE...
310 Jun 2013 @ 11:26 PDTToolsTopicControl characters in BTEQ outputControl characters in Unix file from BTEQ script.Moreover,control characters are common in the file I have the below data in the table KVB empno,ename,gender 1,BHARATH,M 2,VENKAT,M 3,RADHA,...
225 Sep 2012 @ 11:14 PDTDatabaseTopicstrange error SELECT failed 3707 syntax error, expected something '(' between ')' and IN keywordI have created a view with complex logic. While I am trying to select that view.I am getting the error mentioned in the subject. FYI. The logic doesnt contain any IN keyword...   Looks st...
121 Sep 2012 @ 05:48 PDTDatabaseReplyPartition Violation ErrorHi I am using TD 13.I have an erro 5728 with partition violation. I have a table with follwoing structure   CREATE TABLE T1 ( COL1 INTEGER, COL2 DATE FORMAT 'YYYY-MM-DD', COL3 ...

Pages