Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Nitz
Starting Member
3 Posts |
Posted - 2010-10-08 : 16:28:23
|
select * from contactwhere status in (4,5)This is my Query.. here the table 'contact' has a field useridnow i need to fetch the row with status = 2 and userid is not null(ie) select * from contactwhere userid is not nulland status = 2i want to merge the above 2 condnsthat is, status in (2,4,5) but status 2 should be considered only when userid is not nullPlease help me out..Thanks in advance :)~hard work never fails~ |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Nitz
Starting Member
3 Posts |
Posted - 2010-10-08 : 16:36:20
|
is that userid in (4,5) or status in (4,5) ?~hard work never fails~ |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Nitz
Starting Member
3 Posts |
Posted - 2010-10-08 : 18:23:36
|
Hey this works pakka..!!! Thanks a lot !! :)~hard work never fails~ |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|