#DateForumTypeThreadPost
11214 Mar 2011 @ 01:44 PDTDatabaseReplyCannot drop table, query hangsAnd what mode 'ANSI/TERADATA' uses your 'java program'? If ANSI, there can be pending transactions that you must terminate with commit or rollback in order to release the table. HTH. Cheers. ...
11125 Feb 2011 @ 04:03 PSTGeneralReplywhat is more efficient?... or delete all records in table load using Fastload collecting Stats or delete all records with multiload task load using Fastload collecting Stats HTH. Cheers. Carlos.
11023 Feb 2011 @ 05:50 PSTDatabaseReplyHow to import data from Oracle using SQL AssistantTake a look at TPT (ODBC operator + LOAD operator ). HTH. Cheers. carlos
10928 Jan 2011 @ 06:00 PSTConnectivityReplyTPT ODBC Connection to OracleNo much information, so just a shot in the dark: Oracle ODBC code S1C00 => Optional feature not implemented. The driver is trying to do conversion, but it can't. Check for conversion issue...
10826 Jan 2011 @ 12:09 PSTDatabaseReplyDelete duplicate rows(keep only one row from duplicate rows)Discussed many times... Many ways to do it. One of them here (in spanish, as always): http://carlosal.wordpress.com/2009/12/07/borrando-filas-duplicadas-en-teradata/ HTH. Cheers. ...
10718 Jan 2011 @ 06:43 PSTDatabaseReplyI’m wanting to subtract days from date fieldsHi. The issue here is logtime, which happens to be FLOAT datatype (!!). select Logtime, type(LogTime) from DBC.LogOnOff sample 1; *** Query completed. 1 row found. 2 columns returned...
10606 Jan 2011 @ 02:43 PSTToolsReplyIgnore Linefeeds in MLoad from Flat FileThe export method should replace the 0x0A with some code using Oracle REPLACE() function in order to avoid linefeeds inside the varchar2 columns exported into the file. Then you can reconstruct ...
10506 Jan 2011 @ 02:34 PSTAnalyticsReplyequivalent of rownum in td>>"Is it possible to uniquely identify a row within a group of duplicate records ? Like the ROWID available in oracle." No. The Oracle rowid relates to the store (datafile...). And it is NOT imm...
10414 Dec 2010 @ 08:05 PSTGeneralReplyconvert month value 201004 into Apr-2010Your problem is that 'Apr-10' means April 1910: SELECT CAST(CAST('Apr-10' AS DATE FORMAT 'MMM-YY') AS FORMAT 'YYYY/MM/DD'); *** Query completed. One row found. One column returned. *** Total...
10330 Nov 2010 @ 07:15 PSTDatabaseReplyError while Executing FASTLOAD ScriptIf you are generating the file with bteq you should use VARTEXT '|' in the fastload script and generate the file with something like SELECT CAST (id AS VARCHAR(18))||'|'||CAST( units AS VARCHAR(...
10219 Nov 2010 @ 12:04 PSTDatabaseReplyConditional statement in Teradata macroIf there are procedural steps in the SQLServer store procedures, you should use Teradata stored procedures (Hey! They do exist!). Macros cannot give you IF...THEN...ELSE functionality. Macros...
10118 Nov 2010 @ 09:23 PSTDatabaseReplyerror: bad argument for sqrt function>>"teradater should have shown the actual calculation in the beginning :-)" Agreed. The first site to look was the negative values, which were "The Usual Suspects", but teradater misled me : "se...
10017 Nov 2010 @ 07:57 PSTDatabaseReplyerror: bad argument for sqrt functionIt could be an overflow issue for the CNT column (the sum exceeds the column precision): Here is an example: CREATE MULTISET TABLE PRUEBA01( X INTEGER NOT NULL, Y INTEGER NOT NULL, N INTEG...
9916 Nov 2010 @ 12:20 PSTUDAReplyNew to TeradataNew to Teradata or new to SQL? You must remove the 'and' and use a comma ',' instead. UPDATE test.Summary1 SET test.Summary1.c1 = test.s_table.C1 , test.Summary1.c2 = test.s_table.C2 WHERE...
9812 Nov 2010 @ 04:45 PSTExtensibilityReplyConverting Lat/Long valuesIn decimal degrees (as you seem to have) you just change: Latitude: N -> + S -> - Longitude: E -> + W -> - In your example: 24.3N, 97.8W => +24.3, -97.8 (Somewhere in the Gulf of Méxi...
9705 Nov 2010 @ 12:57 PDTDatabaseReplyDynamic Date Calculation in SQL QueryDoh! You're right, Dieter. Ten based arithmetic doesn't fit too well for twelve based years! Cheers. Carlos.
9605 Nov 2010 @ 04:51 PDTDatabaseReplyDynamic Date Calculation in SQL Query>>"The query will choose the first day of the 5th month back and the last day of the current month." A little bit cryptic, but elegant, IMHO ;-) : BTEQ -- Enter your DBC/SQL request or BTEQ ...
9502 Nov 2010 @ 01:22 PDTDatabaseReplyLPAD Function equivalent in TeradataYou may find this useful: http://carlosal.wordpress.com/2009/04/07/lpad-en-teradata/ (in spanish, as usual) HTH. Cheers. Carlos.
9426 Oct 2010 @ 12:46 PDTGeneralReplydays since Jan 1 ,4712 BC in TeradataYou can handle julian dates keeping in mind that dates are integers, and you can apply translations to them. You may take a look here: http://carlosal.wordpress.com/2009/07/14/importando-fech...
9320 Oct 2010 @ 07:08 PDTDatabaseReplySubtracting time fieldsUse Interval data types: CREATE TABLE MY_DB.PRUEBA02 ( ID_N INTEGER NOT NULL, START_TIME TIME(0) NOT NULL, END_TIME TIME(0) NOT NULL ) PRIMARY IN...
9219 Oct 2010 @ 03:36 PDTDatabaseReplyHow could I copy/restore data from a table with CLOB field(s) when using arcmain?The HASH function must be the same in both systems. HTH. Cheers. Carlos.
9110 Oct 2010 @ 02:25 PDTDatabaseReplyGetting error: Selected non aggregate values must be part of the associate groupWeird select... You must use an aggregate (MAX(), for example) for the 'mnths_no_usage' (CASE...) column. HTH. Cheers. Carlos.
9009 Oct 2010 @ 11:41 PDTDatabaseReplyHow to flatten / horizontalize multiple records in Teradata ....using recursionNot rocket science. You may find an example here (in spanish, as always): http://carlosal.wordpress.com/2008/10/15/queries-recursivas-en-teradata/ HTH. Cheers. Carlos.
8927 Aug 2010 @ 12:41 PDTDatabaseReplyHandling the EMPTY/NULL value in the select queryYou are confused about two different things: NULL value and 'no rows returned'. NULL is about columns: the value for a column in some returned rows is NULL, thus you can apply CASE, ask if it IS...
8826 Aug 2010 @ 12:00 PDTDatabaseReplyHandling the EMPTY/NULL value in the select query>>"There will be no record for TR_XXX= 'xxxx'" If there is no row to apply the CASE, How can it be applied? Once again: please post the EXACT SQL and the CREATE TABLE (and the error, if any) ...

Pages