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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Regarding Get Data

Author  Topic 

mailtosaja
Starting Member

28 Posts

Posted - 2008-08-06 : 07:30:30
Hi,
Hi every body...I have the table name is called x
table structure is
EmpID EmpName EmpPin
1 Jess 98
2 Jess1 NULL
3 Jess 99
4 Jess2 NULL
5 Jess5 100

i want get the EmpID for the EmpPin 98,99,null..
I worte the Query

select * from x where empPin in(98,99,null).o/p is
EmpID EmpName EmpPin
1 Jess 98
3 Jess 99

..I doesn't get the correct output..if you know please reply me...Thanks in Advance....

Thanks & Regards,
S.Jess

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-08-06 : 07:33:18
where empPin in(98,99) or empPin is null

Webfred
Go to Top of Page

mailtosaja
Starting Member

28 Posts

Posted - 2008-08-06 : 07:34:38
Hi,
Thanks a lot man.............
Thanks & Regards,
S.Sajan
Go to Top of Page
   

- Advertisement -