#DateForumTypeThreadPost
3721 Oct 2009 @ 05:54 PDTAnalyticsReplyStoring multiple values in a columnWhat you are trying to do is AGAINST 1FN. You should NORMALIZE the column to another table and use sentences with IN or EXISTS.Cheers.Carlos.
3614 Aug 2009 @ 08:39 PDTDatabaseReplyRanking data to get same valueNot sure about your requirement but this may help:CREATE MULTISET TABLE MY_DB.PRUEBA01(THE_Name VARCHAR(5) , THE_Number SMALLINT, THE_Status CHAR(1), THE_Date DATE) PRIMARY INDEX (THE_Name, THE_Num...
3503 Aug 2009 @ 04:46 PDTDatabaseReplyTab in column>>"The CHR(9) represents character.>>And CHR(9) is working fine in Teradata V2R6.>>I've checked through my Queryman (v 7.2.0.03) - it's perfectly giving character!!!"Did you r...
3403 Aug 2009 @ 03:39 PDTDatabaseReplyTab in column>>Literals are always UNICODE.But you can use TRANSLATE to convert to ASCII (latin):select char2hexint('bla'), CHAR2HEXINT(TRANSLATE('bla' USING UNICODE_TO_LATIN)); *** Query completed. One r...
3328 Jul 2009 @ 03:38 PDTDatabaseReplyTab in column>>"CHR and ASCII are not Teradata built-in functions. " Tell us something we don't know.>>"If anyone is able to execute those functions, then off-course UDFs (most probably OracleUDFs) ...
3227 Jul 2009 @ 11:16 PDTDatabaseReplyTab in column>>"(CHR and ASCII) are standard TD functions."Could you point to the exact place in the Teradata Documentation where this is described?Cheers.Carlos.
3127 Jul 2009 @ 10:55 PDTDatabaseReplyTab in column>>Hey it is running fine at my endThis is probably because you have the oracle functions compiled as UDF's in your DB, but I repeat: CHR() is NOT Teradata syntax.The proper way in Teradata is...
3027 Jul 2009 @ 09:10 PDTDatabaseReplyTab in columnAnd your SQL is wrong too. CHR() is NOT Teradata syntax:SELECT '-'||CHR(9)||'-'; $ *** Failure 3706 Syntax error: expected something between '(' and the integer '9'. ...
2906 Jul 2009 @ 09:31 PDTDatabaseReplyCreate temporary tableTry INSERT INTO TempTable SELECT TOP 10 * FROM SourceTable if TempTable is created beforehand.Try CREATE TABLE AS... syntax if not.HTHCheers.Carlos.
2806 Jul 2009 @ 05:04 PDTDatabaseReplySET with UPI1.- Duplicate row check works different with INSERT...SELECT (remove duplicates silently) and INSERT INTO...VALUES (raise errors)2.- If there is a UNIQUE restriction on a SET table (UPI, USI...) Te...
2703 Jul 2009 @ 08:57 PDTDatabaseReplySET with UPIThis may be not true for INSERT...SELECT's. If there is an UPI on a SET TABLE, Teradata silently removes duplicates BEFORE the INSERT and there will be no 'Duplicate unique prime key error' (thus t...
2603 Jul 2009 @ 08:46 PDTToolsReplyUsing Parameter in BTEQOr (if in UNIX/Linux) you can use a 'here document' inside a shell script:#!/bin/bashTHE_DATE=2009-07-03 #This could be your $1 input argumentecho $THE_DATE #Just to show the datebteq << EOF....
2526 Jun 2009 @ 04:53 PDTUDAReplyTIMESTAMP INTERVAL NOT WORKING IN BATCH JCL (BUT WORKS IN SQL ASSISTANT)>>Adding the FORMAT doesn't seem to have helped. Any other ideas would be greatly appreciated.>>FernandoI posted an EXAMPLE of format to show it works. I don't know the format you use t...
2425 Jun 2009 @ 10:20 PDTToolsReplyExport output file formattingTake a look at the Linux/Unix 'sed' command.HTH.Cheers.Carlos.
2325 Jun 2009 @ 10:12 PDTUDAReplyTIMESTAMP INTERVAL NOT WORKING IN BATCH JCL (BUT WORKS IN SQL ASSISTANT)Try formatting your CHAR(26) to TIMESTAMP(6):SELECT 'TIMESTAMP OK' WHERE CAST('2009/06/25 16:00:00.000000' AS TIMESTAMP(6) FORMAT 'YYYY/MM/DDBHH:MI:SS.S(6)' ) BETWEEN CURRENT_TIMESTAMP - CAST(12 ...
2217 Jun 2009 @ 10:10 PDTDatabaseReplyStoring images/PDF/.. in BLOBHere:http://www.teradata.com/teradataforum/Topic15806-10-1.aspxCheers.carlos.
2117 Jun 2009 @ 05:51 PDTToolsReplystoring docs in teradata database ?I used Windows Scripting Host with OLEDB/ADO to load images (jpg) as BLOB columns in Teradata. The file type is irrelevant (jpg, doc, pdf...). BLOB is BLOB is BLOB.Explained here (in Spanish):http:...
2017 Jun 2009 @ 05:42 PDTToolsReplyGroupBy and DIstinctI wrote something about this issue (in Spanish) here: http://carlosal.wordpress.com/2009/06/02/distinct-vs-group-by-en-teradata/HTH.Cheers.Carlos.
1917 Jun 2009 @ 05:30 PDTToolsReplyFASTLOAD cannot find script fileIt seems Windows, so try double quotes:fastload < "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\FASTLOAD\XXX.TXT"HTH.Cheers.Carlos
1809 Mar 2009 @ 07:31 PDTUDAReplyUsing relational operators for CHARThis is not true (at least not in my system):SEL CASE WHEN '00t' > '003' THEN 1 ELSE 0 END;SEL CASE WHEN '00t' > '003' THEN 1 ELSE 0 END; *** Query completed. One row found. One column return...
1705 Mar 2009 @ 10:54 PSTToolsReplyTeradata Utilities - it works but I don't know whyTeradata Tools use CLIv2, not ODBC.Cheers.Carlos.
1627 Feb 2009 @ 08:50 PSTUDAReplyDate of birth MMDDYYYY text convert to date format and get age...And this is still NOT accurate, since the duration of a solar year is slightly less than 365.25 days and thus there are exceptions (for example: years that are evenly divisible by 100 are not le...
1526 Feb 2009 @ 03:08 PSTUDAReplySubtract a column from another column with a different datatypeIn fact, DATE is INTEGER: (YEAR - 1900) * 10000 + MONTH * 100 + DAYCheers.Carlos.
1426 Feb 2009 @ 03:05 PSTUDAReplyDate of birth MMDDYYYY text convert to date format and get ageWhat about leap years? Your math is not completely correct.You may take a look here : http://carlosal.wordpress.com/2008/10/07/%c2%bfque-edad-tienes-en-teradata/ .HTH.Cheers.Carlos.
1330 Jan 2009 @ 08:09 PSTDatabaseTopicMERGE executing both WHEN MATCHED and WHEN NOT MATCHEDHi all:I'm facing problems using MERGE in V2R6 Teradata Database. The client app is VB using ADO throught OLEDB.The fact is that I've traced the errors and it turns out that the MERGE is executing ...

Pages