#DateForumTypeThreadPost
312816 Sep 2014 @ 10:55 PDTAsterReplyHistogram_Map function - need helpNot all those clauses are optional, they're just mutually exclusive. The error message is correct, you have to specify either both BIN_SIZE and START_VALUE or INTERVALS. If there wa...
312715 Sep 2014 @ 08:39 PDTAnalyticsReplyOutlier Treatment in TeradataHi Abhinav, why do you think that rank doesn't work for a 20 million row dataset? I wouldn't consider this big, I can easily run a similar query on VMWare version...   SELECT * FR...
312613 Sep 2014 @ 11:55 PDTGeneralReplyImporting data in data mode is failing in BTEQ USING ( ORG VARCHAR(30), PARTY_ID VARCHAR(11), PARTY_FST_NM VARCHAR(30), PARTY_LST_NM VARCHAR(30), PARTY_LOC VARCHAR(30), PARTY_INCOME VARCHAR(11),...
312513 Sep 2014 @ 07:48 PDTGeneralReplyImporting data in data mode is failing in BTEQHi Rakesh, when you import using VARTEXT, all fields must be defined as VARCHAR, but you got INT and DATE, too.
312413 Sep 2014 @ 01:28 PDTDatabaseReplyCollect statsCOLLECT STATS is considered a DDL statement -> it can only be the final statement within a transaction.   So you can't collect stats after TableA was loaded. Are you sure you need to...
312312 Sep 2014 @ 01:23 PDTDatabaseReplyCAST and SUBSTR can be applied on the same column at a time in the same queryHi Rakesh, your session is set to ANSI mode and this results in casting numeric values right-aligned with leading zeroes. You might switch to BTET mode or simply apply a TRIM, e.g.  ...
312212 Sep 2014 @ 01:17 PDTToolsReplyQuery not working in Teradata SQL Assistant with Teradata .Net while the same query is working with ODBC connection & vice versaThis is from SQL Assistant's help: Teradata.NET Specific Limitations •  TD.NET always uses ANSI date mode. All date literals must be entered as YYYY-MM-DD.    ...
312112 Sep 2014 @ 01:10 PDTGeneralReplyImporting data in data mode is failing in BTEQHint: the data is a comma-delimited text file and you .IMPORT DATA :-)
312012 Sep 2014 @ 01:08 PDTToolsReplyBTEQ Data Truncation while ExportingWIDTH 720 should not truncate. Double check the result, did you forget to delete the output file and BTEQ appended the result?
311911 Sep 2014 @ 12:08 PDTDatabaseReplyDefining two derived tables using WITH clause ??Hi Santanu, this is a stupid bug in the implementation, you need to specify the CTEs in a wrong order: WITH yesterdayDate (yestDate) as ( select currDate - 1 from todayDate), todayDat...
311811 Sep 2014 @ 12:06 PDTExtensibilityReplyReturn a Concatenated string from User defined Funtion through CursorHi Anantha, you can't do that in a SQL UDF. Be glad, performance would be horrible :)  
311711 Sep 2014 @ 11:49 PDTDatabaseReplyConverions of timestamp to FORMAT 'MM/DD/YYYYBHH:MI:SS'Why don't you simply tell which error is returned? This fits your narration: END_EFF_DATE = MAX(BEG_EFF_DT) OVER (PARTITION BY A.SUBSCBR_NUM,A.MBR_SUFFIX,A.CLAIM_NUM ...
311611 Sep 2014 @ 11:23 PDTDatabaseReplySybase to TeradataTry max(cast(cast(feed_key /100 as char(7)) as date format 'yyyyddd')) as last_update_date And you don't need FLOOR as a CAST to INT is the same as FLOOR: cast(feed_key / 100 as ...
311510 Sep 2014 @ 02:47 PDTDatabaseReplySybase to TeradataWhat's the datatype of feed_key?
311410 Sep 2014 @ 02:36 PDTTeradata StudioReplyTrying to import text file into volatile table using Teradata SQL AssistantHi Brian, what is actually failing? Error message?
311310 Sep 2014 @ 01:46 PDTDatabaseReplySybase to TeradataYou need to rewrite the proprietary Sybase syntax to Standard SQL: CONVERT(datatype, column) -> CAST(column AS datatype) YEAR/MONTH(column) -> EXTRACT(YEAR/MONTH FROM column) FLOOR is...
311210 Sep 2014 @ 01:36 PDTGeneralReplyError : [Teradata][ODBC Teradata Driver][Teradata Database] Invalid operation for DateTime or Interval.A NULL in Teradata has a datatype (just don't ask me why). SELECT TYPE(NULL) returns INTEGER and you can't insert an INT into a TIMESTAMP column.
311108 Sep 2014 @ 09:40 PDTDatabaseReplyAND Condition after QualifyWhy not? It's just an additional condition, just without OLAP function...
311007 Sep 2014 @ 10:57 PDTDatabaseReplyAND Condition after QualifyThe 2nd query should result in a syntax error, but the 1st is syntactically valid.   Of course moving both conditions into WHERE will return a different result, in WHERE it's applied bef...
310907 Sep 2014 @ 10:43 PDTDatabaseReplyConvert string into dateHi Rakesh, that's two possible ways, you should use only one of them or add a comma :-)
310807 Sep 2014 @ 10:02 PDTGeneralReplyConverting the Date into Various formatsHi Rakesh, this specifies fractional seconds, (0) = no fraction up to (6) = microseconds
310707 Sep 2014 @ 09:32 PDTGeneralReplyConverting the Date into Various formatsHi Rakesh, a DATE is a date and not a TIMESTAMP, did you work with Oracke before? SELECT CURRENT_DATE, CURRENT_TIMESTAMP(0), CURRENT_TIMESTAMP - INTERVAL '120' DAY If you're on T...
310607 Sep 2014 @ 09:28 PDTDatabaseReplyConvert string into dateHi Rakesh, a FORMAT is only applied when the column is CASTed to a string: CAST(CAST(date_col AS FORMAT 'mmmm-dd-yy') AS VARCHAR(15)) TRIM(CAST(date_col AS FORMAT 'mmmm-dd-yy&...
310507 Sep 2014 @ 08:26 PDTDatabaseReplyOptimization of a Join QueryAs both Derived Table use exactly the same conditions (besides dat_col) you can use the approach I showed. Fold both Derived Tables into one using an or-ed condition on date_col and add the date_co...
310406 Sep 2014 @ 05:41 PDTTeradata StudioReplyChanging TMODE from ANSI to TERA after connection createdThe session mode must be set in the connection string, in Teradata Studio you add TMODE=TERA in the connection properties.

Pages