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 |
mxfrail
Yak Posting Veteran
84 Posts |
Posted - 2009-09-25 : 16:08:53
|
I have two tables -tblcontractdetailtblcontractdetailaddlIn puesdo code -I want to return detailID from tblcontractdetailAddl where tblcontractdetailaddl.productiondate is not in tblcontractdetail.proddate where tblcontractdetail and tblcontractdetailaddl join on contractidCould anyone help? |
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-09-25 : 23:23:03
|
select t1.detailidfrom tblcontractdetailaddl t1 left join tblcontractdetail t ON t.contractid = t1.contractid AND t.prodate <> t1.proddatewhere t.contractid is null |
|
|
|
|
|