Skip to Content
0
Former Member
Oct 01, 2008 at 09:46 AM

how to use recursive sql syntax against DB2 version 8.01

17 Views

When I try to use this recursive sql syntax in a

derived table

-


;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

thanks

Finn