Advertisement
Advertisement
| 07.07.2008 at 02:53PM PDT, ID: 23544925 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: |
select s.* from dbo.WorkOrders s left outer join dbo.AccessWorkorders a on s.WorkorderNumber = a.[WO Number] and cast(convert(char(10), s.WorkorderEntryDate, 120) as smalldatetime) = a.[Date Entered] and s.PtnrAccountNumber = a.[Partner Account] AND s.ResidentName = a.[Resident Name] AND s.HomePhoneNumber = a. [Home TN] and s.BusinessPhoneNumber = a.[Business TN] and s.AccountNumber = a.[BTN] and s.WorkorderTypeCode = a.[Work Order Type] and coalesce(s.CampaignCode, '') = coalesce(a.[Campaign], '') and s.WorkorderStatusCode = a.[Work Order Status] and s.ScCvvActIndicator = a.[Equipment Flag] and coalesce(s.WorkorderCompletionDate, '1900-01-01') = coalesce(a.[Completion Date], '1900-01-01') and s.WorkorderReasonCode = a.[Work Order Reason 1] where a.[wo number] is null and a.[wo number] not like '%_1000_%' and cast(convert(char(10), s.WorkorderEntryDate, 120) as smalldatetime) = '2007-12-07' |