on 10-01-2008 10:46 AM
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
Finn,
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?
Thanks,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.