Archives of the TeradataForum
Message Posted: Fri, 03 Oct 2008 @ 20:33:12 GMT
I am in the process of creating a table using the following statement:
CREATE TABLE AP2.PRCHSUMM AS ( select t.cust_id, concat('20', substr(rpt_dt,1,2), '-', substr(rpt_dt,3,2), '-01') as RPT_DT, . . .
When I execute my SQL, I receive the following error, "Syntax error: expected something between '(' and the string '2'."
Even if I cast my concat function as a date
select t. cust_id, cast (concat('20', substr(rpt_dt,1,2), '-', substr(rpt_dt,3,2), '-01') as DATE FORMAT 'YYYY-MM-DD') as RPT_DT,
I receive the error: "expected something like "||" between the word 'concat' and '('"
Does a technique exist where I can place concatenated data into a database via the create-table-as-select statement?
Thank you for your time.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|