#DateForumTypeThreadPost
26221 Nov 2012 @ 08:47 PSTDatabaseReplyCaculate how many bytes of stringRicky:   1. OCTET_LENGTH():  BTEQ -- Enter your SQL request or BTEQ command: SELECT OCTET_LENGTH('En un lugar de La Mancha...') LENGTH_DEFAULT,     &nbs...
26116 Nov 2012 @ 01:52 PSTToolsReplyTeradata Studio cannot run Stored proceduresI forgot to mention: To change the TD Studio session mode : ->Connection->JDBC Connection Properties->TMODE Cheers. Carlos.
26016 Nov 2012 @ 12:29 PSTToolsReplyTeradata Studio cannot run Stored proceduresDan: RTFM: 5510 Invalid session mode for procedure execution. Explanation: The session mode within which the CALL SQL is submitted is different than the one in which the stored procedure wa...
25916 Nov 2012 @ 12:17 PSTAnalyticsReplyFailure 2805 Maximum row length exceeded in table in abc in BTEQ when using SET operator.Sudeep: You say the length of all the columns combined in both the tables doesn't exceed 5000, whereas Teradata says the contrary. You don't provide the real tables definitions, the real ...
25816 Nov 2012 @ 12:12 PSTDatabaseReplyOracle Replay feature in Teradata?Steven: If you want to move big volumes between systems, you could try Datamover or you could write your own processes. The time will vary depending on many factors (hardware, communications, etc....
25716 Nov 2012 @ 12:08 PSTDatabaseReplyCasting timestamp to date and to charSofia: It's TIMESTAMP(3) then... SELECT CAST(CAST(DATE_DT AS FORMAT 'YYYYMMDD') AS CHAR(8)) AS TXN_DTE,        USER_ID,      ...
25615 Nov 2012 @ 08:06 PSTDatabaseReplyCasting timestamp to date and to charSofia: You seem to be using '+' as a concat operator, which in Teradata must be '||'. You don't provide the table definition, but your query will fail if the column DATE_DT is...
25512 Nov 2012 @ 08:01 PSTAnalyticsReplyHow strip of the non numeric data from VARCHAR fieldRaj: Under certain circumstances you could try something like this: http://carlosal.wordpress.com/2012/11/12/only-numbers-en-teradata-ii/ HTH. Cheers. Carlos.
25412 Nov 2012 @ 01:58 PSTDatabaseReplyFlasback FacilitySteven: You could implement the Oracle 'flashback query' (SELECT ... FROM ... AS OF <TIMESTAMP> ) with Teradata Temporal. HTH Cheers. Carlos.
25312 Nov 2012 @ 01:53 PSTDatabaseReplyOracle Replay feature in Teradata?Steven: You may take a look at Teradata System Emulation Tool. HTH. Cheers. Carlos.
25230 Oct 2012 @ 12:42 PDTDatabaseReplyHow does "interval 'n' month" work? Intervals are intervals: they are 'irrespective' with dates. In TD (and in other RDBMS's, like Oracle) if you add (or substract) intervals to dates (as in your example) the result will ...
25126 Oct 2012 @ 12:39 PDTDatabaseReplyHow to write (CURRENT DATE - 1 YEAR) in teradata?Hi. The solution provided is wrong (or at least not completely right). You should use ADD_MONTH() instead, because: SELECT DATE '2012-02-29' -  INTERVAL '1' YEAR;  ...
25024 Oct 2012 @ 08:07 PDTDatabaseReplyConvert Date and time to GMT(date/Time)I'm not sure about your data, but assuming you have the time as TIME WITH TIMEZONE you can build a timestamp with time zone and do something like:   SELECT MY_TIMESTAMP_WITH_TIME_ZONE, ...
24923 Oct 2012 @ 07:43 PDTToolsReplyhelp needed with bteq delimiter options.Vinay: The only delimiter non-character allowed is TAB. If you have such a file, consider pre-process it through 'sed' or something ... Cheers. Carlos.
24809 Oct 2012 @ 02:40 PDTConnectivityReply"Invalid date supplied for" errorHi. I executed your query in a MSQuery window with no errors (only replaced 'SEL' with 'SELECT', I'm a purist!). Execute SQL window: "SELECT CAST('9999-12-31 17:59:5...
24705 Oct 2012 @ 04:13 PDTDatabaseReplyLeft Function || Conversion of Sql Server to Teradata You don't give DDL's, your attempts and the errors you get, but   SELECT    CASE       WHEN (SUBSTR(COLUMNNAME,1,2) <> '60' AND COL...
24605 Oct 2012 @ 12:42 PDTDatabaseReplyTimestamp difference help needed!Hi: Not sure about what you're after. You could try something like:   WHEN ( CAST(call_end_tmstp AS DATE) = CAST(rec_last_updt_tmstp AS DATE)        AND ...
24502 Oct 2012 @ 07:58 PDTDatabaseReplyconvert string to timestampSorry, pressed the key too soon: If you have your timestamp strings in a fixed-length format, you can do something like: SELECT CAST(SUBSTR(THE_TS_STRING,1,18) ||      ...
24402 Oct 2012 @ 06:44 PDTDatabaseReplyconvert string to timestampTeradata supports timestamp up to 6 decimals, your timestamp is 9 decimals (!!). If you want to get a TS(0) you should try to get rid of the fractional digits:    BTEQ -- Enter your SQ...
24325 Sep 2012 @ 12:44 PDTDatabaseReplyUsing MERGE into a table with an identity column. Result: Failure 5758Matt: This is a common misundertanding of the clause 'DEFAULT' (even in the other RDBMS's out there). DEFAULT is used when no value is provided, not when value NULL is provided (as yo...
24214 Sep 2012 @ 05:58 PDTDatabaseReplyFastload File read: 35, Text: EOF encountered before end of recordAs I said, fastload will not take in account the double quotes as 'field content' delimitator, so each time it encounters a comma assumes a new field: "February 29, 2012","&...
24114 Sep 2012 @ 02:13 PDTDatabaseReplyFastload File read: 35, Text: EOF encountered before end of recordMallesh: Please, share the fastload script if you want us to help you... Two points: The comma separator in your (presumed) first field will split the first date into two (February 29 + 2012) as...
24013 Sep 2012 @ 11:58 PDTDatabaseReplyWhat software is needed on Linux server to connect to Teradata database?Deren You need the CLIv2 and the TTUs for Linux (Note that the TTUs are not free-downloadable). HTH Cheers. Carlos.
23912 Sep 2012 @ 03:06 PDTToolsReplyBTEQ - Cannot write hexa character in output file Hi: Try  .IF ERRORCODE <> 0 THEN .QUIT instead of  .IF ERRORCODE != 0 THEN QUIT. HTH. Cheers. Carlos.  
23824 Aug 2012 @ 03:28 PDTAnalyticsReplyJOIN - Need to include a.tkt_num = b.tkt_num And (a.tkt_num not = b.tkt_num) >>"Can you please assist me with the following Join Query… I’d like my query to always show everything from the pedw_tmp.tickets_ccb_tmp even if there’s nothing in ...

Pages