 |
 |
Archives of the TeradataForum
Message Posted: Sat, 04 Oct 2008 @ 20:04:34 GMT
Subj: | | Re: Create table as "select statement" |
|
From: | | Michael Larkins |
Oscar:
Since dates with dashes or slashes in them need to be enclosed in a quote, that might be your problem. Otherwise the system thinks you are
trying to do subtraction or division math.
Try this:
CREATE TABLE AP2.PRCHSUMM AS
( select
t.cust_id,'''20||substr(rpt_dt,1,2)||'-'||substr(rpt_dt,3,2)||'-01''' as
RPT_DT, ...
Regards,
Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor
| |