3128 | 16 Sep 2014 @ 10:55 PDT | Aster | Reply | Histogram_Map function - need help | Not 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... |
3127 | 15 Sep 2014 @ 08:39 PDT | Analytics | Reply | Outlier Treatment in Teradata | Hi 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... |
3126 | 13 Sep 2014 @ 11:55 PDT | General | Reply | Importing 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),... |
3125 | 13 Sep 2014 @ 07:48 PDT | General | Reply | Importing data in data mode is failing in BTEQ | Hi Rakesh,
when you import using VARTEXT, all fields must be defined as VARCHAR, but you got INT and DATE, too.
|
3124 | 13 Sep 2014 @ 01:28 PDT | Database | Reply | Collect stats | COLLECT 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... |
3123 | 12 Sep 2014 @ 01:23 PDT | Database | Reply | CAST and SUBSTR can be applied on the same column at a time in the same query | Hi 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.
... |
3122 | 12 Sep 2014 @ 01:17 PDT | Tools | Reply | Query not working in Teradata SQL Assistant with Teradata .Net while the same query is working with ODBC connection & vice versa | This 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.
... |
3121 | 12 Sep 2014 @ 01:10 PDT | General | Reply | Importing data in data mode is failing in BTEQ | Hint: the data is a comma-delimited text file and you .IMPORT DATA :-)
|
3120 | 12 Sep 2014 @ 01:08 PDT | Tools | Reply | BTEQ Data Truncation while Exporting | WIDTH 720 should not truncate.
Double check the result, did you forget to delete the output file and BTEQ appended the result?
|
3119 | 11 Sep 2014 @ 12:08 PDT | Database | Reply | Defining 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... |
3118 | 11 Sep 2014 @ 12:06 PDT | Extensibility | Reply | Return a Concatenated string from User defined Funtion through Cursor | Hi Anantha,
you can't do that in a SQL UDF.
Be glad, performance would be horrible :)
|
3117 | 11 Sep 2014 @ 11:49 PDT | Database | Reply | Converions 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
... |
3116 | 11 Sep 2014 @ 11:23 PDT | Database | Reply | Sybase to Teradata | Try
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 ... |
3115 | 10 Sep 2014 @ 02:47 PDT | Database | Reply | Sybase to Teradata | What's the datatype of feed_key?
|
3114 | 10 Sep 2014 @ 02:36 PDT | Teradata Studio | Reply | Trying to import text file into volatile table using Teradata SQL Assistant | Hi Brian,
what is actually failing? Error message?
|
3113 | 10 Sep 2014 @ 01:46 PDT | Database | Reply | Sybase to Teradata | You 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... |
3112 | 10 Sep 2014 @ 01:36 PDT | General | Reply | Error : [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.
|
3111 | 08 Sep 2014 @ 09:40 PDT | Database | Reply | AND Condition after Qualify | Why not?
It's just an additional condition, just without OLAP function...
|
3110 | 07 Sep 2014 @ 10:57 PDT | Database | Reply | AND Condition after Qualify | The 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... |
3109 | 07 Sep 2014 @ 10:43 PDT | Database | Reply | Convert string into date | Hi Rakesh,
that's two possible ways, you should use only one of them or add a comma :-)
|
3108 | 07 Sep 2014 @ 10:02 PDT | General | Reply | Converting the Date into Various formats | Hi Rakesh,
this specifies fractional seconds, (0) = no fraction up to (6) = microseconds
|
3107 | 07 Sep 2014 @ 09:32 PDT | General | Reply | Converting the Date into Various formats | Hi 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... |
3106 | 07 Sep 2014 @ 09:28 PDT | Database | Reply | Convert string into date | Hi 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&... |
3105 | 07 Sep 2014 @ 08:26 PDT | Database | Reply | Optimization of a Join Query | As 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... |
3104 | 06 Sep 2014 @ 05:41 PDT | Teradata Studio | Reply | Changing TMODE from ANSI to TERA after connection created | The session mode must be set in the connection string, in Teradata Studio you add TMODE=TERA in the connection properties.
|