Link to home
Start Free TrialLog in
Avatar of dionisio_79
dionisio_79

asked on

problem launching sql query from c#

Hi experts,
I have the following error message
If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon
when i launch a query from my c# code. The same query works on sql server.
The query is
with a as (SELECT ROW_NUMBER()  OVER (ORDER BY xxx) AS num , * from dbo.xxx) select top (200) * from a as selezione
ASKER CERTIFIED SOLUTION
Avatar of zvytas
zvytas
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dionisio_79
dionisio_79

ASKER

now I've got an incorrect sintax near ';'
incorrect sintax near ','
Show me your C# code you use to run the query.