1078 | 14 Jul 2011 @ 01:11 PDT | Database | Reply | Executing a multi-statement request | Hi 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 ... |
1077 | 14 Jul 2011 @ 09:56 PDT | Analytics | Reply | GROUP BY ROLLUP | You'll find all the info you need in the SQL manuals.
Dieter |
1076 | 14 Jul 2011 @ 09:55 PDT | Database | Reply | Extracting values - teradata function | Rounding?
CAST(col AS DEC(10,0))
If 2.5 will be 2 or 3 depends on the RoundHalfwayMagUp setting in dbscontrol.
Dieter |
1075 | 14 Jul 2011 @ 09:49 PDT | Database | Reply | DROP OLDEST PARTITION AND ADD NEW PARTITION | Hi 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... |
1074 | 14 Jul 2011 @ 09:43 PDT | Database | Reply | Executing a multi-statement request | Hi Andrew,
as the error message indicates:
don't run the call in a multi-statement :-)
Do you q |
1073 | 14 Jul 2011 @ 09:36 PDT | Database | Reply | Simple Update | Update Employee set end_date=effective_date-1 where empid=1
Dieter |
1072 | 14 Jul 2011 @ 09:35 PDT | Database | Reply | Delete After Journal | You 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 |
1071 | 14 Jul 2011 @ 09:28 PDT | Database | Reply | make use of ppi partition elimination without a hardcoded date | This yould be helpful:
http://developer.teradata.com/blog/dnoeth/2011/03/global-and-session-level-parameters-in-sql
Dieter |
1070 | 14 Jul 2011 @ 09:22 PDT | Database | Reply | Query Logging NumResultRows column is always zero | You'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... |
1069 | 11 Jul 2011 @ 01:13 PDT | Database | Reply | how to capture mismatched records | Finding 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
... |
1068 | 10 Jul 2011 @ 03:20 PDT | Database | Reply | Sample Function | Why 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... |
1067 | 10 Jul 2011 @ 02:34 PDT | Training | Reply | Want 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... |
1066 | 08 Jul 2011 @ 05:43 PDT | Database | Reply | 2620: The format or data contains a bad character | You'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... |
1065 | 07 Jul 2011 @ 10:32 PDT | Database | Reply | Unable 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... |
1064 | 07 Jul 2011 @ 10:13 PDT | Database | Reply | Unable 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?
... |
1063 | 07 Jul 2011 @ 09:58 PDT | Database | Reply | Access Error | CREATE TABLE AS seems to copy the journal definition, too.
Try
CREATE TABLE Target.mytable, NO JOURNAL AS Source.mytable WITH DATA
Dieter |
1062 | 07 Jul 2011 @ 09:55 PDT | Database | Reply | Too 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... |
1061 | 07 Jul 2011 @ 09:28 PDT | Database | Reply | Running slloww | Is 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... |
1060 | 07 Jul 2011 @ 08:45 PDT | Database | Reply | Stored 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) ... |
1059 | 07 Jul 2011 @ 08:19 PDT | Database | Reply | Unable to parse a string | You need the remaining string after the eShop?
SUBSTRING(url FROM POSITION('/eShop/' IN url) + 7)
Dieter |
1058 | 07 Jul 2011 @ 08:16 PDT | Tools | Reply | How to parse out fast export record mode output | Each 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... |
1057 | 07 Jul 2011 @ 06:57 PDT | Database | Reply | Too much resources | Too 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... |
1056 | 07 Jul 2011 @ 06:28 PDT | Database | Reply | Help 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... |
1055 | 07 Jul 2011 @ 12:33 PDT | Database | Reply | Help 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;
... |
1054 | 07 Jul 2011 @ 12:09 PDT | Database | Reply | VOLATILE 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... |