#DateForumTypeThreadPost
307801 Sep 2014 @ 08:14 PDTToolsReplyTPT scripting: Escaping characters in Atribute fieldsI can't test it right now, but I would assume you need to double the single quotes within the string: VARCHAR OsCmd = 'awk -F "[/,]" ''NR>1{printf("%s,%s,%s,%02...
307701 Sep 2014 @ 08:04 PDTGeneralReplyUSING DDMMYYYY INSIDE DBC.SYSEXECSQL() in Stored ProcedureHi Arun, you pass a string to SysExecSQL, so you need double any single quote within your string: CALL DBC.SYSEXECSQL('Select CAST( (Event_Date (FORMAT ''YYYYMMDD'') ) AS C...
307601 Sep 2014 @ 05:13 PDTDatabaseReplyCalculation Precision issue Oracle Vs TeradataHi Ankit, Teradata rounds after every step based on the precision of the datatypes. There's a rule of thumb, multiply first, then divide, but in your case this will not help: SELECT 23.88 ...
307530 Aug 2014 @ 04:23 PDTDatabaseReplyMy perception on EXPLAIN was wrongHi Cheeli, this is not a runtime error like "numeric overflow", it's simply based on the internal processing of a query: syntaxer -> resolver -> security check -> query rewr...
307430 Aug 2014 @ 02:47 PDTDatabaseReplyCopy the record and increment in its one columnYou are close :-) Cross join to a list of numbers between 1 and 15: insert into tab select tab.col1,tab.col2,tab.colx + n from tab cross join ( -- get numbers from 1 to 15 select top ...
307329 Aug 2014 @ 01:43 PDTDatabaseReplyFormat with leading zerosSimply padding with leading blanks can be done with a FORMAT: 'A' || CAST(acct_id AS FORMAT '9(6)')  
307229 Aug 2014 @ 07:41 PDTToolsReplyMload error: RDBMS failure: 2644, No more room in database abcSeems like this is failing when the LogTable should be created. Check the available perm space of abc (on an AMP level, not with a SUM) or qualify it with a different database.    
307129 Aug 2014 @ 07:33 PDTUDAReplyProblem Using UPSERTThis error message simply means that you're updating the PI or partitioning if the target table, which is not allowed in an UPSERT (or MERGE). 5565 The UPDATE specified in the UPSERT statem...
307029 Aug 2014 @ 07:29 PDTDatabaseReplyQUERY CHALLENGE - FIND CUSTOMERS WHO HAVE SPECIFIC PRODUCTSHi Slice, the outer WHERE filters for customers with either product 11 or 12 and the subquery removes them if they got any other product.
306929 Aug 2014 @ 07:27 PDTToolsReplyFast load Vs Mload when AMP is downA table without Fallback is destroyed when an AMP looses data.
306829 Aug 2014 @ 07:09 PDTDatabaseReplyCASE Statement error please helpYou need to rewrite the IN to a Correlated Subquery. And you can remove the IS NOT NULL, because NULs never compare equal: SEL A.*, CASE WHEN CUST_NM = CC_Lookup THEN CASE WHEN CUS...
306728 Aug 2014 @ 12:18 PDTConnectivityReply.NET data provider - cant see in visual studioAFAIK the .NET Data Provider is not in T@YS, it's published via DevEx only: .NET Data Provider
306628 Aug 2014 @ 10:24 PDTDatabaseReplyQUERY CHALLENGE - FIND CUSTOMERS WHO HAVE SPECIFIC PRODUCTS  SELECT * FROM tab AS t1 WHERE prod_id IN (11,12) AND NOT EXISTS ( SELECT * FROM tab AS t2 WHERE t1.cust_id = t2.cust_id AND t2.prod_id NOT IN (11,12) ); SELECT cu...
306528 Aug 2014 @ 05:20 PDTDatabaseReplyCalling Stored Procedures from Dynamic SQL StatementHi Thomas, check the SQL Stored Procedures and Embedded SQL manual. There's a section named SQL Statements that Cannot Be Used Dynamically and CALL is one of them.
306428 Aug 2014 @ 04:29 PDTToolsReplyLooking for command line versions Teradata Parallel Transporter (TD ->streaming->SQL)Hi Joop, I never did this, but you should be able to use a DataConnector as consumer with an OLEDB Access Module. Check the Job Example 13: Export Data and Process It with an Access Module in the...
306327 Aug 2014 @ 09:53 PDTDatabaseReplyIdentifying GTT or volatile tables created during a sessionMaterialized GTT within your session are listed in dbc.AllTempTablesVX
306227 Aug 2014 @ 04:20 PDTDatabaseReplyDefining two derived tables using WITH clause ??This should work: INSERT INTO target WITH cte .... SELECT * FROM cte  
306127 Aug 2014 @ 03:08 PDTGeneralReplySAMPLE WITH REPLACEMENTJust have a look at the manuals: http://www.info.teradata.com/HTMLPubs/DB_TTU_14_00/index.html#page/SQL_Reference/B035_1146_111A/ch01.032.249.html
306026 Aug 2014 @ 02:22 PDTDatabaseReplyROLLING 12 MONTHSI don't understand what you mean. Using CURRENT_DATE automatically changes the result every month.
305926 Aug 2014 @ 02:14 PDTDatabaseReplyRows to Column (Column-delimited)Wrap the query in a Derived Table and add a ROW_NUMBER: SELECT TRIM(ROW_NUMBER() OVER (ORDER BY ACCOUNT#, rn) (FORMAT'9(4)')) || ',' || TRIM(ACCOUNT#) || ',' || txt ...
305826 Aug 2014 @ 09:25 PDTDatabaseReplySyntax error expected something like a name between ',' and the 'LE' keywordThe only way to use a keyword as a column name is double quoting it: "le"   You should check if there's a setting in Informatica to automatically enclose object names in d...
305726 Aug 2014 @ 07:58 PDTDatabaseReplyDefining two derived tables using WITH clause ??Replace the 2nd WITH with a comma: WITH TEMP_TAB(a,b,c) AS (Select a,b,c from table) ,TEMP_TAB2(a,x,y) AS (Select a,x,y from table) Sel derived_columns from TEMP_TAB inner join TEMP...
305626 Aug 2014 @ 03:44 PDTDatabaseReplyDetermine status on a given dateThe error message tells exactly what's wrong: KEY is a keyword, if there's actually a column named key in your table you must use double quotes: "key"  ...
305525 Aug 2014 @ 12:30 PDTDatabaseReplySpecial CharactersHi John, of course there is, it's called UPDATE :-) update tab set col = oTranslate (col, '0D0A'xc,'') where col <> oTranslate (col, '0D0A'xc,'') &n...
305425 Aug 2014 @ 10:15 PDTDatabaseReplySpecial CharactersHi John,  CHAR2HEXINT returns a string of digits, so you can't use oTranslate. '0D0A' is a Windows carriage return/linebreak combination, simply use oTranslate(col, '0D0A'...

Pages