#DateForumTypeThreadPost
1017 Sep 2014 @ 02:28 PDTGeneralReplyConvert calender date (YYYY-MM-DD) to julian dateHi,  You can cast it like this: SELECT CURRENT_DATE (DATE, FORMAT 'YYYYDDD');    *** Query completed. One row found. One column returned.  *** Total ela...
911 Mar 2013 @ 11:08 PDTDatabaseReplyLENGTH() function in bteqHi, Can you provide the SQL you use in BTEQ? I believe it has something to do with data type of the string itself. I think it has to be a varchar data type. Please do cast the value first to va...
806 Feb 2013 @ 06:55 PSTDatabaseReplyInvalid TimestampHi, Please check if the result of the concatinated values is in proper format before casting to timestamp.  
730 Jan 2013 @ 08:41 PSTDatabaseReplyConvert integer to TIME  Hi,   I think this will work:   SELECT CAST(TRIM(CAST(1256 AS CHAR(4))||'00') AS TIME(0) FORMAT 'HHMISS');   Output: ----------...
602 Jul 2012 @ 10:26 PDTAnalyticsReplyExtracing ZONE part from a TIMESTAMP(0) WITH TIME ZONE column   I tried doing it like this:   SELECT EXTRACT(TIMEZONE_HOUR FROM CAST('2010-08-26 14:42:45+10:00' AS TIMESTAMP(0) WITH TIME ZONE)); Result: 10  ...
502 Jul 2012 @ 12:07 PDTGeneralReplyModifying the partition with case_n You can use alter table command. In your case this will do:   ALTER TABLE testpartition MODIFY PRIMARY INDEX PARTITION BY ( CASE_N( sys = 1, sys = 2, sys =...
401 Jul 2012 @ 07:34 PDTDatabaseReplyHow to add space to database What I think you can do is add space on User/Database A. You can logon as dbc. MODIFY DATABASE A AS PERM = 1e9; then pass the perm space to C, MODIFY DATABASE C AS PERM = 1e9; th...
329 Jun 2012 @ 02:28 PDTToolsReplyHow to bypass the valid comma separator during the fastload Another approach is you can edit the file using awk command in unix. then after that you can use fastload using the newfile. Here is a sample command:   awk -F ","...
229 Jun 2012 @ 12:45 PDTGeneralReplyHow to generate multiple records from single record another example I have in mind:   SELECT ROW_NUMBER() OVER (PARTITION BY t.id ORDER BY a.id) AS seq_no, t.id, t.customername, t."account", t.salary FRO...
114 Jun 2012 @ 02:00 PDTGeneralReplyrecursive query http://forums.teradata.com/forum/analytics/transposing-data