HI,
I have written this query. it is working in query builder but when try to
run through camel it shows the following error
"com.microsoft.sqlserver.jdbc.SQLServerException:
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name
'ADDRESS_EMAIL'."
SELECT distinct TOP 1 MOBILE,FAX,ADDRESS_EMAIL,
(case when((select count(*) from urole where r_id = 3 and U_ID = ID)>0) then
1 else 0 end as ROLE,
case when((select count(*) from urole where r_id = 4 and u_id = ID) > 0)
then 1 else 0 end as ADMIN,
case when((select count(*) from urole where r_id = 2 and u_ID = ID)>0) then
1 else 0 end as VENDOR,
case when((select count(*) from urole where r_id =9 and u_id = ID)>0) then
1 else 0 end as NO_SURVEY_FLAG) from myuser
where ADDRESS_EMAIL = :?emailID
Note : I have used the following driver
sqljdbc4
Let me know what went wrong.
Thanks,
Noorul
--
View this message in context:
http://camel.465427.n5.nabble.com/Sub-Query-is-not-working-with-SQL-Server-tp5755388.html
Sent from the Camel Development mailing list archive at Nabble.com.