camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "noorul11@gmail.com" <nooru...@gmail.com>
Subject Sub Query is not working with SQL Server
Date Tue, 19 Aug 2014 11:33:38 GMT
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.

Mime
View raw message