#DateForumTypeThreadPost
37103 Mar 2009 @ 11:56 PSTDatabaseReplyNOT inThis is not really a Teradata question. The SQL standard semantics for NOT IN require this behavior.
37003 Mar 2009 @ 11:50 PSTUDAReplygetting an error on this codeYou are connecting via ODBC with "parsing" (also called Use of ODBC Extensions) enabled. YEAR, MONTH, etc. are ODBC functions, and in simple cases the driver can fix the SQL to be Teradata compatib...
36902 Mar 2009 @ 07:46 PSTUDAReplygetting an error on this codeYEAR is not a Teradata function. Use EXTRACT(YEAR FROM CURRENT_DATE).
36802 Mar 2009 @ 07:34 PSTDatabaseReplysql questionIn Teradata mode, COUNT(*) returns an INTEGER by default.You are correct that CAST to FLOAT makes sense only if you want an approximate "order of magnitude" answer. But you may want to CAST to BIGI...
36701 Mar 2009 @ 08:04 PSTDatabaseReplyhelp with a querySELECT O.Order_Num FROM Order_Table OWHERE NOT EXISTS (SELECT 1 FROM Order_Product OP WHERE O.Order_Num = OP.Order_Num AND OP.Product_ID=510);
36628 Feb 2009 @ 05:58 PSTToolsReplyError file using MultiloadYou're asking about two entirely different things. The DISPLAY ERRORS and NOSTOP only apply to the client-side conversion from delimited VARTEXT to VARCHAR fields (with binary length prefix) - prio...
36528 Feb 2009 @ 05:37 PSTToolsReplyAvoid header and trailer using MultiloadAll records in one input file must be able to use the same LAYOUT.You could write INMOD or AXSMOD user exit to omit the header & trailer.
36428 Feb 2009 @ 05:31 PSTDatabaseReplyInteger formatsThe "Data Types & Literals" manual does describe the meaning of the FORMAT phrase itself, but details regarding data type conversions are in the "Functions & Operators" manual.
36328 Feb 2009 @ 05:24 PSTToolsReplyNeed help in BTEQ(Import)Your input file is not in the proper format for IMPORT DATA. Looks like VARTEXT delimited by ' ' based on your post.Note that when using VARTEXT the USING clause must describe each input field as ...
36227 Feb 2009 @ 09:18 PSTDatabaseReplyInteger formatsFormat '-(10)9' is a "floating minus" while '-9(10)' is fixed location for the sign and leading zeros shown. If you were to CAST to CHAR(11), 123456 would be BBBBB123456 (where B is a space) with '...
36127 Feb 2009 @ 08:58 PSTDatabaseReplySubstring in where statementThat's not the correct syntax for the Teradata "substring" function. I suspect you are using ODBC (e.g. SQL Assistant) and allowing it to parse the query. When you put the function in the SELECT li...
36011 Feb 2009 @ 09:32 PSTUDAReplywhy should we use SET table ?First, I'd suggest you verify that you have chosen a good Primary Index. If the number of rows with any given PI value is small, the SET table duplicate row checking overhead is small. There may be...
35910 Feb 2009 @ 09:47 PSTUDAReplywhy should we use SET table ?Actually, there IS a difference between SET and MULTISET even if you have a UNIQUE index:CREATE TABLE T1 (c1 INTEGER NOT NULL, c2 INTEGER) PRIMARY INDEX (c1);INSERT T1 VALUES (1,1);INSERT T1 VALUES...
35809 Feb 2009 @ 11:07 PSTUDAReplycast (-18989899 as date)It's not Teradata that is "blanking out" dates in that range, it's Windows.Use BTEQ, or tell SQL Assistant not to use Windows formatting for dates, or tell Teradata to CAST the value to CHAR before...
35706 Feb 2009 @ 09:26 PSTToolsReplyMainframe 2 Non-Mainframe LoadTry to avoid doing this.The Teradata utilities expect both character and numeric data to be in "native" format on the client.For numeric data, even the SMALLINT variable length indicators for VARCH...
35605 Feb 2009 @ 11:36 PSTThird Party SoftwareReplyInformatica vs Teradata BTEQThe real question to ask is whether you can do the transformations entirely within the database (Informatica calls it "push down") or if the processing is such that you MUST export it to another se...
35505 Feb 2009 @ 11:20 PSTUDAReplycast (-18989899 as date)As noted, -18989899 is the Teradata INTEGERDATE equivalent of date'0001-01-01'.When you use Windows local format to display that date (e.g. in SQL Assistant, see Tools/Options/General) then it is d...
35405 Feb 2009 @ 11:10 PSTToolsReplyProblem with Multiload Accept.ACCEPT only supports numeric values and quoted strings as input, so you have two options for your EXPORT. Convert to a numeric INTEGERDATE string, e.g.:sel TRIM(cast(end_date as INTEGER)) (title '...
35302 Feb 2009 @ 04:02 PSTToolsReplyFastexport - how to export without beginning two bytes ?Create a small OUTMOD to strip off the two-byte VARCHAR length field.
35201 Feb 2009 @ 01:18 PSTDatabaseReplyManipulating 2-digit yearThe result of EXTRACT is INTEGER, with default FORMAT '-(10)9'.If you want the result in CHAR format, just use two CASTs; the first just specifies the conversion format and the second actually conv...
35128 Jan 2009 @ 06:24 PSTDatabaseReply3504: Selected non-aggregate values must be part of the associated group Error on max-case statementYou can't put an aggregate inside a CASE, but you can put a CASE inside an aggregate:MAX(casewhen substr(a.field1,1,4) = (CAST(current_date as format 'YYYY') as CHAR(4)) then a.field2 else NULLen...
35026 Jan 2009 @ 09:56 PSTToolsReplyFastload - keeping your logon id and password secureBased on your description, you want to "pipe" the stdout from sed to stdin for fastload.sed 's/logonid/logon,password/g' <FLOAD_DIM_BRANCH.txt | fastload
34918 Jan 2009 @ 02:14 PSTToolsReplyHow to get return code after BTEQ excuted SQL in VBScriptYou may want to ask this question in a Microsoft (WSH) forum; it really has nothing to do with Teradata or BTEQ. I suspect you will need to use Exec method rather than Run.
34814 Jan 2009 @ 06:32 PSTAnalyticsReplyUsing the sum(if (date - another_date &lt; 5))select sum(case when ddobj - current_date < 5 then 1 else 0 end)from WFA_PROV_CMBwhere CTR in ('STC')and STAT in ('IE','IX','HI','P','PA','PC','PX','PW','IK','I')and scrcomp between date'2009-01...
34712 Jan 2009 @ 04:13 PSTToolsReplyLoading multiple tables with Fastload only logging in onceFastLoad has supported RUN command since TTU8.0 (FastLoad 7.6).

Pages