#DateForumTypeThreadPost
107814 Jul 2011 @ 01:11 PDTDatabaseReplyExecuting a multi-statement requestHi Andrew, of course, this is how an SP is invoked. There must be something else going wrong. Could you post the actual source code? Oops, i just noticed my previous post was cut off. How ...
107714 Jul 2011 @ 09:56 PDTAnalyticsReplyGROUP BY ROLLUPYou'll find all the info you need in the SQL manuals. Dieter
107614 Jul 2011 @ 09:55 PDTDatabaseReplyExtracting values - teradata functionRounding? CAST(col AS DEC(10,0)) If 2.5 will be 2 or 3 depends on the RoundHalfwayMagUp setting in dbscontrol. Dieter
107514 Jul 2011 @ 09:49 PDTDatabaseReplyDROP OLDEST PARTITION AND ADD NEW PARTITIONHi vani, could you post the source code you acztually tried? MIN(PARTITION) returns the lowest actually used *logical* partition number, which is usually 1. Your partitioning creates partiti...
107414 Jul 2011 @ 09:43 PDTDatabaseReplyExecuting a multi-statement requestHi Andrew, as the error message indicates: don't run the call in a multi-statement :-) Do you q
107314 Jul 2011 @ 09:36 PDTDatabaseReplySimple UpdateUpdate Employee set end_date=effective_date-1 where empid=1 Dieter
107214 Jul 2011 @ 09:35 PDTDatabaseReplyDelete After JournalYou have to run it from arcmain: checkpont (xxxx), with save followed by delete saved journal (xxxx) Btw, the maintenance of the journals should be part of your backup process :-) Dieter
107114 Jul 2011 @ 09:28 PDTDatabaseReplymake use of ppi partition elimination without a hardcoded dateThis yould be helpful: http://developer.teradata.com/blog/dnoeth/2011/03/global-and-session-level-parameters-in-sql Dieter
107014 Jul 2011 @ 09:22 PDTDatabaseReplyQuery Logging NumResultRows column is always zeroYou'll find the requested info in dbc.QryLogStepsV if you enable query logging "with stepinfo". It's the RowCount column for a UPD/INS/DEL StepName. For a MERGE (MRM-step) RowCount is the numbe...
106911 Jul 2011 @ 01:13 PDTDatabaseReplyhow to capture mismatched recordsFinding unmatched records: - using NOT EXISTS on all columns, maybe needs DISTINCT, be aware of NULLs - using EXCEPT, NULLs are treated equal select * from tab_a except select * from tab_b ...
106810 Jul 2011 @ 03:20 PDTDatabaseReplySample FunctionWhy do you post this question in a thread about SAMPLE? As Teradata uses Standard SQL you join multiple tables using multiple JOINs: from t1 join t2 on t1.col1 = t2.col1 join t3 on t1.col3...
106710 Jul 2011 @ 02:34 PDTTrainingReplyWant Teradata SQL Tutorial@teradatamanuals "In Teradatamanuals, you can find all Teradata PDF Manuals which are difficult to find on Net." Of course it's difficult to find manuals from 2002/2003 like the "Introduction...
106608 Jul 2011 @ 05:43 PDTDatabaseReply2620: The format or data contains a bad characterYou're SUMming the result of the CASE statement which is a string. SUM needs a numeric value so it's trying to cast 'Fashion' etc. into a FLOAT. What are you trying to achieve? Number of row...
106507 Jul 2011 @ 10:32 PDTDatabaseReplyUnable to parse a string How to decide which one to use: https://www.services.com/eServices/eshop/.... or https://www.services.com/eServices/..../eshop/.... I don't think there's an easy way to do that, unless you kn...
106407 Jul 2011 @ 10:13 PDTDatabaseReplyUnable to parse a string You don't want the remaining string, ok. But what do you actually want? I don't get it. Is eShop ment to be a placeholder and you want to extract the actual value in the position of eShop? ...
106307 Jul 2011 @ 09:58 PDTDatabaseReplyAccess Error CREATE TABLE AS seems to copy the journal definition, too. Try CREATE TABLE Target.mytable, NO JOURNAL AS Source.mytable WITH DATA Dieter
106207 Jul 2011 @ 09:55 PDTDatabaseReplyToo much resources#1: You need to resolve the BETWEEN; WHERE F.VAL_DT BETWEEN R.STRT_DT AND R.MO_END_DT --> (SELECT STRT_DT FROM RPT_MO_AN) = F.VAL_DT #2: You got a 150 AMP system as the unique row resulte...
106107 Jul 2011 @ 09:28 PDTDatabaseReplyRunning sllowwIs there a competition at your site? "Write the most obfuscated query" SELECT DISTINCT D1.c2 AS c1 , D1.c3 AS c2 , D1.c4 AS c3 , D1.c5 AS c4 , D1.c1 AS c5 DISTINCT is not needed as the Derived...
106007 Jul 2011 @ 08:45 PDTDatabaseReplyStored Procedures, Dynamic SQL, Funky Range Scans, and GETINTRANGE#1 and #2 could be easily covered when the user changes the input format. 100, 101, 105 TO 107, 110 can be used as-is in an IN-condition, the range using TO is a hardly known (and hardly used) ...
105907 Jul 2011 @ 08:19 PDTDatabaseReplyUnable to parse a string You need the remaining string after the eShop? SUBSTRING(url FROM POSITION('/eShop/' IN url) + 7) Dieter
105807 Jul 2011 @ 08:16 PDTToolsReplyHow to parse out fast export record mode outputEach record starts in the default EXPORT FORMAT FASTLOAD with two bytes indicating the record length X, optionally followed by some bytes for null INDICATOR bits, followed by N bytes of binary data...
105707 Jul 2011 @ 06:57 PDTDatabaseReplyToo much resourcesToo much CPU? There are 3 product joins due to the BETWEENs. You might get rid of the two joining to a single row in TD13 using a Scalar Subquery: http://developer.teradata.com/blog/dnoeth/20...
105607 Jul 2011 @ 06:28 PDTDatabaseReplyHelp with CONTINUE HANDLER!!Hi Mauricio, if this is your source code, then the cursor is part of the error handling action which isonly executed when there's an error :-) REPLACE PROCEDURE DBA.SP_STATS_GRUPO2() BEGIN D...
105507 Jul 2011 @ 12:33 PDTDatabaseReplyHelp with CONTINUE HANDLER!!A handler must be declared at the beginning of a "compound statement" after any variables and before any SQL statement: BEGIN DECLARE variables ... DECLARE HANDLER ... FOR ... END; ...
105407 Jul 2011 @ 12:09 PDTDatabaseReplyVOLATILE TABLE - Where is it located?Volatile tables are stored in SPOOL and there's no info stored in any system table. Thus the only way to retrieve the metadata of a VT is a HELP/SHOW TABLE. If you forgot the name you can get...

Pages