Visual Studio 2010 - CASE Statement
Posted: Thu 26 Jan 2017 13:10
Hello.
I'm testing dotConnect (last version) with Visual Studio 2010 connecting directly to a Oracle 12 Server.
I've created several TableAdapters with queries without problems. But now I need to create a new one with a query that includes a CASE statement and I get an error on this return field. If I comment this case all works but uncommented throws an error when trying to crate the Fill method.
The exact format of case is:
CASE WHEN HMA.SITUATION = 'QOH' THEN 'Despatch' ELSE 'Return' END
And the error generated is:
SELECT clause error: expression near 'HMA'.
Cannot analyze the query text.
The same query (copy and paste) works perfectly on Oracle SQL Developer.
What I'm doing wrong?
I'm testing dotConnect (last version) with Visual Studio 2010 connecting directly to a Oracle 12 Server.
I've created several TableAdapters with queries without problems. But now I need to create a new one with a query that includes a CASE statement and I get an error on this return field. If I comment this case all works but uncommented throws an error when trying to crate the Fill method.
The exact format of case is:
CASE WHEN HMA.SITUATION = 'QOH' THEN 'Despatch' ELSE 'Return' END
And the error generated is:
SELECT clause error: expression near 'HMA'.
Cannot analyze the query text.
The same query (copy and paste) works perfectly on Oracle SQL Developer.
What I'm doing wrong?