I need to find invoices tied to different order numbers from same site and invdate. Trying to find some data issues.
Ordstbl
OrdID int
Invnbr nvarchar(25),
Ordnbr nvarchar(25),
SiteID nvarchar(25),|
InvDate datetime
Data:
1,200b,1214,200,'7-15-2013'
2,200c,1214,300,'7-15-2013'
3,200c,1214,200,'7-5-2013'
4,200b,1215,200,7-15-2013'
I table has 100 of thousands of records.
Output: recid1,4 are included in output since inv200b an site200 and invdate match tied to order 1214
1,200b,1214,200,'7-15-2013'
4,200b,1214,200,'7-15-2013'
Thanks.