By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,364 Members | 1,341 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,364 IT Pros & Developers. It's quick & easy.

CASE stmt with isnull()

P: 42
select country,
IsNull(A,0) as A,
IsNull(B,0) as B,
---- Here I need to add case stmt. I have data B in Db if it is B then I have to show C else I have to C

from <Table-name>

Please help me how to do this? It is very urgent

Thanks
Apr 23 '08 #1
Share this Question
Share on Google+
2 Replies


ck9663
Expert 2.5K+
P: 2,878
select country,
IsNull(A,0) as A,
IsNull(B,0) as B,
---- Here I need to add case stmt. I have data B in Db if it is B then I have to show C else I have to C

from <Table-name>

Please help me how to do this? It is very urgent

Thanks

Use CASSE

-- CK
Apr 23 '08 #2

ganeshkumar08
P: 31
Hello

Try this..

select country,
IsNull(A,0) as A,
IsNull(B,0) as B,
-- My code
case when isnull(B,0) < = 0 then C else C End as 'C'
from <Table-name>

If this is not ok, please explain me clearly i write and give u...

Ganesh
Apr 23 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.