#DateForumTypeThreadPost
51230 Aug 2016 @ 11:58 PDTDatabaseReplySet multiple variable in one case statement Hi. What does it mean "Teradata code"? bteq script? Stored Procedure? Other? CASE (SQL) won't work this way, maybe a SP will. Cheers. Carlos.
51130 Aug 2016 @ 04:47 PDTDatabaseReplyFormatting in TeradataHi. G=Group Separator -(9)=Minus sign (if applicable) for 9 positions 9=Last number before decimal separator mandatory. D=Decimal Separator 9(2)= two decimal positions. Cheers. Carlos.
51030 Aug 2016 @ 04:16 PDTDatabaseReplyFormatting in TeradataHi Have you tried FORMAT 'G-(9)9D9(2)' ? HTH. Cheers. Carlos.
50923 Aug 2016 @ 02:07 PDTDatabaseReplyRead Timezone Without ':' CharacterHi. You'll have to process the string to get a readable Teradata format (the day of month must be two digits too). BTW: 5 Mar 2015 was not Monday. HTH. Cheers. Carlos.
50819 Aug 2016 @ 03:12 PDTDatabaseReplyPadding and timestampHi. You may take a look at this thread: http://forums.teradata.com/forum/database/converting-string-to-date-using-regexp-getting-error-3798 HTH. Cheers. Carlos.
50718 Aug 2016 @ 03:56 PDTDatabaseReplyTeradata Query-URGENTHi Dieter. I'm afraid the mode I fall into is much less polite than yours... ;-) Cheers. Carlos.
50613 Aug 2016 @ 12:23 PDTToolsReplyBTEQ and OReplaceHi. And if the problem is in the .sql, why don't you post it instead of the shell script? Cheers. Carlos.
50511 Aug 2016 @ 10:29 PDTToolsReplybteq help neededHi. Look for "here document" in the net. Your line is the first of a "here document" script executing in bteq with the stdout and stderr redirected to a trace file based on the date and time...
50425 Jul 2016 @ 09:06 PDTDatabaseReplyData migration between 2 different BoxesHi. arcmain dump + arcmain restore / copy should work, but you must take care of things such as if the systems are same version, number of AMPs, etc... You should review the documentation before ...
50325 Jul 2016 @ 08:43 PDTDatabaseReplyMerge into operationHi. Teradata MERGE INTO DOES NOT require a primary key. It requires that the target  table PRIMARY INDEX columns (and partitioning columns if PPI) are present in the match condition (equality...
50222 Jul 2016 @ 04:01 PDTDatabaseReplyHow to calculate minimum & maximum values based on a column only if the records are continuousHi. I overlooked the dates and didn't understand the logic you wanted. Adhering to your example, you can get the results you want:   BTEQ -- Enter your SQL request or BTEQ comman...
50120 Jul 2016 @ 12:59 PDTDatabaseReplyFastload Duplicate Records issuesHi. Fastload DOES NOT put full duplicate rows in an ERROR TABLE. Fastload puts UNIQUE PRIMARY INDEX violations in ERROR TABLE 2. To the OP: You can check duplicates in the file using something l...
50019 Jul 2016 @ 06:36 PDTToolsReplyTPT - ScriptingHi.heers. You can use Templates and Generated Schemas. Cheers. Carlos.
49919 Jul 2016 @ 04:43 PDTDatabaseReplyUsing Volatile table in stored procedureHi. If you use a cursor as a resulset for returning rows to a user and this cursor selects rows from a volatile table, then you must declare it as a dynamic cursor, because the volatile table does...
49818 Jul 2016 @ 06:13 PDTToolsReplyTPT read fixed file and convert space to null valueHi. If file is TEXT the SCHEMA fields should be CHAR. You must use CASE WHEN in the SELECT ... FROM OPERATOR  FILE_xxx_READER. HTH. Cheers. Carlos.
49718 Jul 2016 @ 12:08 PDTDatabaseReplyHow to calculate minimum & maximum values based on a column only if the records are continuousHi. And what stops you from looking it up in the documentation (SQL Data Manipulation Language, Chapter 1)? Cheers. Carlos
49616 Jul 2016 @ 01:47 PDTDatabaseReplyHow to calculate minimum & maximum values based on a column only if the records are continuousHi. You can use a PERIOD datatype from your begindate & enddate and use a NORMALIZE clause. Cheers. Carlos.
49514 Jul 2016 @ 12:15 PDTDatabaseReplyNOT IN and nested queryHi. If you get NULLs from table11.col11 the NOT IN will not work. You can try NOT EXISTS instead or filter the NULLs in the subquery. BTW: the DISTINCT is irrelevant for the subquery. HTH. Che...
49406 Jul 2016 @ 09:12 PDTDatabaseReplyDecimal ValueHi. The datatype is NOT storing the value as ".00" (numbers are numbers). The FORMAT is what displays the data in one or other way. You can define a FORMAT at column level (when cr...
49329 Jun 2016 @ 02:54 PDTDatabaseReplySyntax Error: WHERE "a"."Field1" IN("b"."Test1", "b"."Test2") You can turn the "b" SELECT into a subquery and then use the IN clause. You could spare the rest of the "b" columns if you only need Var1 and Var5 and your select list is only a.SITE_ID. The IN...
49229 Jun 2016 @ 01:30 PDTDatabaseReplySyntax Error: WHERE "a"."Field1" IN("b"."Test1", "b"."Test2") Hi. Replace "CROSS JOIN" with a comma "," and change the IN clause to: WHERE a.SITE_ID = b.Var1 OR a.SITE_ID = b.Var5 Cheers. Carlos.
49129 Jun 2016 @ 03:27 PDTDatabaseReplyDifference between NOT IN() AN NOT(COL1 IN))Hi. The two "IN" expresions are equivalent. Have you experienced any performance difference? If so, post the execution plan. NOT IN is not the same as NOT EXISTS if NULLs are prese...
49022 Jun 2016 @ 12:46 PDTToolsReplyNeed Help regarding TPT ODBC OperatorHi Steve. I've been using the bundled DD drivers (_tora27) on TPT with ODBC operators with the "warning window / disclaimer" appearing on each execution, but working O...
48919 Jun 2016 @ 02:52 PDTToolsReplyNeed Help regarding TPT ODBC OperatorHi. The bundled versions of DataDirect Oracle ODBC drivers have a 'trial period' and then a message of 'license expired' appears. I think the last TPT 14.10 versions have the driv...
48816 Jun 2016 @ 02:03 PDTDatabaseReplypassing parameter to mload script and loading into target tableHi. Please provide the table DDL (at least the column datatypes) and the param.txt file. Cheers. Carlos.

Pages