371 | 03 Mar 2009 @ 11:56 PST | Database | Reply | NOT in | This is not really a Teradata question. The SQL standard semantics for NOT IN require this behavior. |
370 | 03 Mar 2009 @ 11:50 PST | UDA | Reply | getting an error on this code | You 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... |
369 | 02 Mar 2009 @ 07:46 PST | UDA | Reply | getting an error on this code | YEAR is not a Teradata function. Use EXTRACT(YEAR FROM CURRENT_DATE). |
368 | 02 Mar 2009 @ 07:34 PST | Database | Reply | sql question | In 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... |
367 | 01 Mar 2009 @ 08:04 PST | Database | Reply | help with a query | SELECT 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); |
366 | 28 Feb 2009 @ 05:58 PST | Tools | Reply | Error file using Multiload | You'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... |
365 | 28 Feb 2009 @ 05:37 PST | Tools | Reply | Avoid header and trailer using Multiload | All 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. |
364 | 28 Feb 2009 @ 05:31 PST | Database | Reply | Integer formats | The "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. |
363 | 28 Feb 2009 @ 05:24 PST | Tools | Reply | Need 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 ... |
362 | 27 Feb 2009 @ 09:18 PST | Database | Reply | Integer formats | Format '-(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 '... |
361 | 27 Feb 2009 @ 08:58 PST | Database | Reply | Substring in where statement | That'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... |
360 | 11 Feb 2009 @ 09:32 PST | UDA | Reply | why 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... |
359 | 10 Feb 2009 @ 09:47 PST | UDA | Reply | why 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... |
358 | 09 Feb 2009 @ 11:07 PST | UDA | Reply | cast (-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... |
357 | 06 Feb 2009 @ 09:26 PST | Tools | Reply | Mainframe 2 Non-Mainframe Load | Try 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... |
356 | 05 Feb 2009 @ 11:36 PST | Third Party Software | Reply | Informatica vs Teradata BTEQ | The 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... |
355 | 05 Feb 2009 @ 11:20 PST | UDA | Reply | cast (-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... |
354 | 05 Feb 2009 @ 11:10 PST | Tools | Reply | Problem 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 '... |
353 | 02 Feb 2009 @ 04:02 PST | Tools | Reply | Fastexport - how to export without beginning two bytes ? | Create a small OUTMOD to strip off the two-byte VARCHAR length field. |
352 | 01 Feb 2009 @ 01:18 PST | Database | Reply | Manipulating 2-digit year | The 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... |
351 | 28 Jan 2009 @ 06:24 PST | Database | Reply | 3504: Selected non-aggregate values must be part of the associated group Error on max-case statement | You 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... |
350 | 26 Jan 2009 @ 09:56 PST | Tools | Reply | Fastload - keeping your logon id and password secure | Based 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 |
349 | 18 Jan 2009 @ 02:14 PST | Tools | Reply | How to get return code after BTEQ excuted SQL in VBScript | You 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. |
348 | 14 Jan 2009 @ 06:32 PST | Analytics | Reply | Using the sum(if (date - another_date < 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... |
347 | 12 Jan 2009 @ 04:13 PST | Tools | Reply | Loading multiple tables with Fastload only logging in once | FastLoad has supported RUN command since TTU8.0 (FastLoad 7.6). |