how to use recursive sql syntax against DB2 version 8.01
When I try to use this recursive sql syntax in a
;WITH myCTE (CustID, Co) AS
SELECT CustomerID, CompanyName FROM Customers
SELECT CustID, Co FROM myCTE
I get an error :
Exception: DBD,[IBM][Cli Driver][db2] SQL0199N The use of the reserved word "AS" following "" is not valid Expected Tokens may include: "FULL LEFT INNER RIGHT". SQLSTATE =42601
If I use the same syntax in Toad against the same
DB2 no errors at all.
All the help is highly repreciated
is it possible that you have some non-printable characters like a certain type of carriage return or tab embedded in the SQL code that makes the error appear?