What is wrong with this syntax?

General

What is wrong with this syntax?

I am borrowing some code from a colleaue which works for him...but when I copy and paste from his email into the Teradata SQL Assistant, I'm getting this error:  Syntax error, expecting something like ')' between the word 'DATE' and the string '2'.  

Here is the code:

CREATE SET VOLATILE TABLE vtdate, NO LOG AS (
SELECT DATE '2015-03-31'  AS fdate
      ,DATE '2015-08-31'  AS ldate
) WITH DATA PRIMARY INDEX (fdate)
ON COMMIT PRESERVE ROWS ;

Again, it's working for my colleague, not for me.   What am I missing?  Thanks!

1 REPLY
Teradata Employee

Re: What is wrong with this syntax?

Sometimes embedded formatting codes, e. g. in Rich Text Format can cause issues.

Paste the SQL as plain text (e.g. into NotePad) and then copy the plain text version and paste that into SQL Assistant.