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 |
pelolori
Starting Member
15 Posts |
Posted - 2010-12-04 : 10:50:58
|
Hi,i've three table table A: field Docentry,Docnum,DocDateTable B: Field Docentry(JOIN with A),Item Code, DocDate, Ref1,DocdateTable C:Field Ref1( JOIN with B),Itemcode, Docdatei want to extract all DocNum from A where A.Docdate is different from C.DoCDatehow can i get this information by query sql? |
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-12-04 : 12:57:26
|
Try:Select A.Docentry, A.DocNum, A.DocDate, C.DocDate as CDocDatefrom tablea A inner join tableb B on A.Docentry = B.Docentryinner join TableC C on B.Ref1 = C.Ref1and A.DocDate <> C.DocDateRegards,BohraI am here to learn from Masters and help new bees in learning. |
 |
|
|
|
|