#DateForumTypeThreadPost
67119 Jun 2015 @ 03:33 PDTDatabaseReplyLooping in Stored ProcedureYou can't dynamically evaluate a variable name in SPL. If you put the SQL text into a table (with a sequence number column and with appropriate host variable names in the statement te...
67009 Jun 2015 @ 07:41 PDTDatabaseReplyMerge Script is Taking alot of TimeHow skewed is the distribution of NUSI values? How critical is the NUSI for query? Could a single-table JI be used instead? (Maybe sparse JI, omitting the highly skewed values?)
66909 Jun 2015 @ 07:10 PDTDatabaseReplyVariables in TD?You can define and use variables inside a stored procedure definition. You can't do that inline in regular Teradata SQL.
66809 Jun 2015 @ 07:37 PDTDatabaseReplyRestore Failed : table id doesn't match for DBS.To use RESTORE, leave the original table alone; if you want a backup of the contents, make a new backup table. If you create a new target table, you must (re)GRANT any the access ri...
66705 Jun 2015 @ 02:20 PDTDatabaseReplyeasy loaderInclude the other option names in front of the values (all on one line)   tdload --SelectStmt "sel * from src_table;" --SourceTdpID src_tdpid --SourceUserName src_user --SourceUser...
66603 Jun 2015 @ 05:47 PDTDatabaseReplyimport data from file in to teradata tableThe USING clause should specify MSG_CNTNT CLOB AS DEFERRED BY NAME
66503 Jun 2015 @ 05:19 PDTDatabaseReplyRemoving a line break character in a columnUnfortunately oTranslate returns LATIN only if all three arguments are LATIN. Otherwise the LATIN arguments are implicitly translated to UNICODE and the result also becomes UNICODE. And literal str...
66403 Jun 2015 @ 04:17 PDTGeneralReplyInterpretation of PhysIOKB in dbc.QryLogStepsHow are you breaking down Total I/O for the step to minute-by-minute values?
66320 May 2015 @ 03:45 PDTDatabaseReplyWhat's going on with the median function in Teradata?MEDIAN function was introduced in TD15.0 but it was a reserved word long before that. Highlighting also depends on the version of the client tool in use (SQL Assistant or Studio).
66220 May 2015 @ 03:33 PDTTeradata ApplicationsReplyTPT export and error code 2595Check DBC.Software_Event_LogV for any messages around the time of the error, which may indicate the reason for abort.
66116 May 2015 @ 08:37 PDTDatabaseReplyTeradata Row limitation & behaviour with minus SQL queryVerify the column ordering is the same for both tables in the first query. There should be no difference in behavior based on number of columns. If you can't find anything wrong with the query,...
66013 May 2015 @ 04:50 PDTDatabaseReplyExecute Teradata Stored Procedure from SQL ServerA stored procedure can only be called in the same mode (Teradata BTET or ANSI) used to define the procedure. Change the Session Mode option in the ODBC DSN configuration.
65913 May 2015 @ 04:42 PDTToolsReplyFASTLOAD Date format issueYou need to do the cast in the INSERT, not in the DEFINE. Change these two lines   ,DOB (VARCHAR(10))   ,:DOB (DATE, FORMAT 'MM/DD/YYYY')
65813 May 2015 @ 04:39 PDTExtensibilityReplyIssue with Stored ProcedureYou can't execute a statement that returns data dynamically via EXECUTE or SysExecSQL. You would need to use a dynamic cursor. Or don't use dynamic SQL at all. For example SELECT SYSLIB.AB...
65710 May 2015 @ 08:01 PDTGeneralReplyError : [Teradata][ODBC Teradata Driver][Teradata Database] Invalid operation for DateTime or Interval.What is the datatype of dtime? Is it INTERVAL HOUR TO SECOND or INTERVAL DAY TO SECOND?
65606 May 2015 @ 10:19 PDTDatabaseReplyNeed help!! Extracting year from table Name Assuming the two-digit years are all 20yy: CAST('20'||SUBSTRING(TABLENAME FROM CHARACTER_LENGTH(TABLENAME) - 3 FOR 4)||'01' AS DATE FORMAT 'YYYYMMDD') Note: Use DBC.T...
65506 May 2015 @ 10:13 PDTUDAReplywhy should we use SET table ?No, the behavior of SET / MULTISET is unchanged. The INSERT/SELECT into the SET table succeeds and inserts two rows. CREATE TABLE T1 (c1 INTEGER NOT NULL, c2 INTEGER) PRIMARY INDEX (c1); I...
65406 May 2015 @ 03:24 PDTDatabaseReplyCASE statement in WHERE clauseWHERE requires a logical expression so CASE is not valid. But assuming the $1 and $2 are resolved before the statement is passed to BTEQ, if $1 and $2 are expressions that the database must evalua...
65306 May 2015 @ 03:18 PDTDatabaseReplyLastAccess Time stamp not getting updated for tableThe query does not access the Global Temporary Table itself, but rather a "materialized instance" of the Global Temporary table which is unique to the session and dropped when t...
65230 Apr 2015 @ 01:02 PDTExtensibilityReplyIssue with Stored ProcedureYou can't use EXECUTE  / SysExecSQL for a SELECT. Use a dynamic cursor.  
65128 Apr 2015 @ 09:51 PDTDatabaseReplyHow to read Journal Table in teradata ?No. Journal table contents are not accessible via SQL.
65028 Apr 2015 @ 09:50 PDTDatabaseReplywrong timestamp displayedTO_TIMESTAMP follows Oracle rules.  CAST('03/26/2015 04:00:32' TO TIMESTAMP(0) FORMAT'mm/dd/yyyyBhh:mi:ss') Or if it's a constant, just timestamp'2015-03-26 04:0...
64928 Apr 2015 @ 09:38 PDTDatabaseReplyConverting CET TO PST timestampDepends partly on how your system is set up. If dbscontrol TimeDateWZControl is 3 or 4, then the job that loads the data should SET TIME ZONE = 'Europe Central' and the SELECT can specify ...
64828 Apr 2015 @ 09:22 PDTDatabaseReplyCreating and populating a parameterized table inside a stored procedureConvert the INSERT/SELECT to dynamic SQL (EXECUTE IMMEDIATE or CALL DBC.SysExecSQL). Or use CREATE TABLE AS ... WITH DATA.
64728 Apr 2015 @ 09:12 PDTGeneralReplyPermanent Journal creation at Table Level1. You must create a PJ using CREATE DATABASE or MODIFY DATABASE before you can name it or default to it in any CREATE TABLE. 2. You can explicitly name a journal table that already exists in anot...

Pages