Starnge Variable Error

GI

Member
Hello

Under D7 Ent and DOA v4.0.6.2 try the following case:

Use a TOracleQuery with a bind variable :DATEVAR of type otDate and the Sql statement
SELECT COL1,COL2 FROM TABLE1 WHERE COL3
 
Bind variables are not allowed in DDL statements. You can however declare your variable as a substitution variable otSubst. Note that you should provide a format mask and add quotes:

Code:
CREATE TABLE TABLE2 AS
  SELECT COL1,COL2
    FROM TABLE1
   WHERE COL3<=TO_DATE(':DATEVAR', 'DD-MM-YYYY')
We'll check out the parenthesis issue. That's quite annoying.
 
Back
Top