#DateForumTypeThreadPost
8723 Aug 2010 @ 11:50 PDTToolsReplySend email from Remote Console?Marcus: A simple script (WSH in Windows, bash in Linux/UNIX...) will do the trick. It can take the output file as the content for the mail and send it to the desired recipients. Cheers. Ca...
8620 Aug 2010 @ 03:49 PDTGeneralReply3706 error on Qualify codePlease, post the ENTIRE SQL sentence (the show table is desirable too) Cheers. Carlos.
8519 Aug 2010 @ 11:45 PDTDatabaseReplyto change the titlevenkytd: >>"CarlosAL, you are trying to say that to add a new column " No. I don't. RTFM: " ADD column_name data_type_declaration data_type_attributes column_storage_a...
8419 Aug 2010 @ 01:07 PDTDatabaseReplyto change the titleYou can change the title (and I do mean 'TITLE'): alter table your_db.your_table ADD job_code TITLE 'depart number'; You can change the name of the column: alter table your_db.your_table R...
8317 Aug 2010 @ 11:59 PDTDatabaseReplyHelp with Join IndexThree things come to my mind: ·Statistics (lack of). ·Data amount. ·Data distribution. Cheers. Carlos.
8209 Aug 2010 @ 04:02 PDTDatabaseReplyStrange behaviour joining to concatenated variablePlease post the EXACT SQL, the one you posted is INCORRECT. There is a comma missing after 'txn.tx_acct_no' and the real name for the column is 'tx_acct_no', so the join on 'on txn.acct_no = ac...
8101 Aug 2010 @ 11:34 PDTAnalyticsReplyPassing Case Expression to a IN OperatorI'll try it for you: SELECT * FROM MY_DB.PRUEBA02 ORDER BY ID_C; *** Query completed. 5 rows found. 2 columns returned. *** Total elapsed time was 1 second. ID_C C_TXT ---- ------...
8030 Jul 2010 @ 12:05 PDTAnalyticsReplyPassing Case Expression to a IN Operator>>"However you are passing numeric values , how do we do it with character values." Just the same as with numbers ;-). SELECT * FROM MY_DB.PRUEBA01 WHERE COALESCE('A,B,C', TRIM(id_C)) LIKE ...
7926 Jul 2010 @ 06:03 PDTToolsReplyNeed Header Row in FastExport / TPT Export.?You can use a UNION ALL to export the headings: BTEQ -- Enter your DBC/SQL request or BTEQ command: SELECT * FROM MY_DB.PRUEBA01 ORDER BY ID_N; *** Query completed. 10 rows found. 2 colu...
7826 Jul 2010 @ 12:15 PDTDatabaseReplySpool treatment for DISTINCT versus GROUP BYI seem to recall that they work the same since V12. Cheers. Carlos.
7723 Jul 2010 @ 03:24 PDTDatabaseReplySpool treatment for DISTINCT versus GROUP BYYup. It's in spanish. http://translate.google.com is your friend... Cheers. Carlos.
7622 Jul 2010 @ 12:04 PDTDatabaseReplySQL Query Tunning>>"Can anyone tell me how should I proceed further ?" 1.- EXPLAIN (learn how to use it) 2.- "SQL Request and Transaction Processing" (read it from top to bottom) 3.- Test, Test, Test HTH. ...
7521 Jul 2010 @ 11:58 PDTDatabaseReplySpool treatment for DISTINCT versus GROUP BYDISTINCT and GROUP BY are different beasts (at least until v12). You may find this interesting: http://carlosal.wordpress.com/2009/06/02/distinct-vs-group-by-en-teradata/ HTH. Cheers. ...
7419 Jul 2010 @ 07:55 PDTAnalyticsReplyPassing Case Expression to a IN OperatorMaybe something like this: BTEQ -- Enter your DBC/SQL request or BTEQ command: SELECT * FROM MY_DB.PRUEBA01 ORDER BY ID_N; *** Query completed. 10 rows found. 2 columns returned. *...
7319 Jul 2010 @ 06:28 PDTDatabaseReply<Error> value for a field"In DEFINE the field is specified as CHAR and in the target table it has VARCHAR." "is there a work around for this issue without changing the target datatype?" RTFM: When the DEFINE comma...
7216 Jul 2010 @ 06:03 PDTDatabaseReplysynonyms The Oracle synonyms (for tables and views) are implemented with Views in Teradata. Cheers. Carlos.
7115 Jul 2010 @ 12:39 PDTToolsReplyFast Export producing unreadable text fileIt's clear as a day: you are not willing to use an effective export tool (multiple sessions, support environment, restart, parallel, INMOD/OUTMOD...) because you get paid for the keystrokes you don...
7014 Jul 2010 @ 07:02 PDTToolsReplyFast Export producing unreadable text file"I was hoping for something simpler." Simpler than what? Your question was "Any idea what I am missing here?" Here you have the answer. You don't like it? Then go ahead with a SELECT * FRO...
6914 Jul 2010 @ 05:50 PDTToolsReplyFast Export producing unreadable text fileYou must cast the entire resultset as a unique column with type CHAR(N) with MODE RECORD FORMAT TEXT: ... .EXPORT OUTFILE blah/blah/blah/file MODE RECORD FORMAT TEXT ; SELECT CAST( ...
6813 Jul 2010 @ 06:32 PDTToolsReplymloading of single table with multiple fileYou can load with multiple files in parallel with TPT Update Operator. HTH. Cheers. Carlos.
6712 Jul 2010 @ 08:27 PDTDatabaseReplyGenerating dynamic queriesSELECT * FROM THE_TABLE WHERE THE_DATE = your_date AND THE_COUNTRY = CASE THE_DATE WHEN '2010-01-01' THEN 'US' WHEN '2010-01-02' THEN 'JPN' WHEN '2010-01-03' THEN 'UK' END; HTH. Cheers...
6612 Jul 2010 @ 08:14 PDTDatabaseReplyHelp Neeed: conditional execution in macro>>"@Carlos..Cannot we handle this in a macro?" Sure: REPLACE MACRO Mymacro( id integer, param_2 varchar(10), param_3 date format 'YYYY-mm-dd') as ( CALL MYSP(:id, :param_2, :param_3); )...
6509 Jul 2010 @ 12:02 PDTDatabaseReplyHelp Neeed: conditional execution in macroIt seems a typical use of a stored procedure... HTH. Cheers. Carlos.
6407 Jul 2010 @ 08:37 PDTDatabaseReplyDate SubtractionSomething like this may help: SELECT CAST((CAST('2010-07-06' AS INTEGER) - CAST('2010-06-26' AS INTEGER)) /100 AS INTERVAL MONTH) Diff_In_Months; *** Query completed. One row found. One co...
6301 Jul 2010 @ 01:53 PDTAnalyticsReplyhashrow functionPlease put the REAL bteq output of the execution. There is a missing parenthesis ')' in the second select. Your statement won't run. Cheers. Carlos.

Pages