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
 Intersection

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-08-09 : 09:13:40
Parwej writes "i have one table, fields are

cs_call_id , fromid , toid , body
----------------------------------
101 1 2 fg
101 3 2 df
101 4 2 fd
101 4 1 dfd
101 3 1 w3e

i would like to find

conversation between
2,3,4

means find the row or 2,3,4 (fromid or toid)"

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-08-09 : 10:19:18
you mean like this?

select * from Tbl
where fromid in (2,3,4) or toid in (2,3,4)


Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-08-09 : 11:01:31
AND condition ?
select *
from table
where fromid in (2, 3, 4)
and toid in (2, 3, 4)



KH

Go to Top of Page
   

- Advertisement -