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 |
asifbhura
Posting Yak Master
165 Posts |
Posted - 2008-09-15 : 04:27:06
|
Hi,I have 2 tables(tab1,tab2)in tab1 field name id id, actiontaken etc.in tab2 the related record for tab1field are id, IsApprove etcnow i want records from tab1 where actiontaken=yes and its related records must be trueif related records are false then record(s) must not be fetched.only actiontaken=yes and related records are true then only.Regards,ASIF |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-15 : 04:29:57
|
SELECTFROm tab1 t1INNER JOIN tab2 t2ON t2.id=t1.idwhere t1.actiontaken='yes'and t2.IsApprove='true'if ISApprove is of bit type use IsApprove=1 |
 |
|
|
|
|