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
 is it correct?

Author  Topic 

sundarsrini_s
Starting Member

6 Posts

Posted - 2008-06-02 : 05:42:42
hi!

i want to use IN query like

select ... from ...
where field1 in (...)
and field2 in (....)

when i write query like this, the result is display.
but its wrong.
is it correct?

dineshasanka
Yak Posting Veteran

72 Posts

Posted - 2008-06-02 : 05:43:59
use , to seperate you values

select * from table
where field1 in ('A','B')
and field2 in (1,2,3)


---------------------
http://dineshasanka.spaces.live.com/
Go to Top of Page

raky
Aged Yak Warrior

767 Posts

Posted - 2008-06-02 : 05:47:51
quote:
Originally posted by sundarsrini_s

hi!

i want to use IN query like

select ... from ...
where field1 in (...)
and field2 in (....)

when i write query like this, the result is display.
but its wrong.
is it correct?



Please post the sample data and expected output to get accurate solution.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-02 : 05:57:54
quote:
Originally posted by sundarsrini_s

hi!

i want to use IN query like

select ... from ...
where field1 in (...)
and field2 in (....)

when i write query like this, the result is display.
but its wrong.
is it correct?


Why do you think its wrong? Illustrate with some data
Go to Top of Page
   

- Advertisement -