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 |
satish.gorijala
Posting Yak Master
182 Posts |
Posted - 2010-12-17 : 04:37:49
|
Hi, I have table like this.CID TID12 P512 p616 p516 P678 P680 p685 P5 My requirement is, if i took one particular CID then the TID should be either P5 or P5,P6 but not only p6.For exmaple, if i took CID =12, then the TID for this one is P5 and P6. so i will consider this.IF i took CID = 80, then it exists in only P6. so i wont considerIf i took CID = 85, then it exists in only P5. then i condiser thisSo i am looking for the query of this type.Select CID from table where PID ='P5' or PID in (P5,P6) and PID <>'P6'Please give the correct querydeveloper :) |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-12-17 : 04:59:06
|
Select CID from table where PID ='P5' No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|