PDA

Click to See Complete Forum and Search --> : [RESOLVED] Help with Linking/ Getting NOT EXISTS


tuber
Nov 14th, 2008, 10:07 AM
Below is what I'm trying to show in Crystal, it's a NOT EXISTS.

I need records from the employer table that are not in my view.

I know that Crystal doesn't have a way of doing NOT EXISTS so how do I set up the linking for this?

This is driving me crazy!

Any help would be greatly appreciated!




SELECT employer_unique, employer_id, emp_state, Fulfillment_Pack_Completed_By
FROM employer
WHERE (NOT EXISTS
(SELECT employer_unique
FROM vwSPCompanyInfo
WHERE (employer.employer_unique = employer_unique))) AND (Web_Update_Action <> 'DELETE') AND (Business_Structure = 'Sole Proprietor' OR
Business_Structure = 'Partnership') AND (employer_type <> 'G' OR
employer_type = 'L') AND (Fulfillment_Pack_Complete_Date >= CONVERT(DATETIME, '2008-09-13 00:00:00', 102)) AND (Status_Code = 'ENR')
ORDER BY Fulfillment_Pack_Completed_By, Fulfillment_Pack_Complete_Date Desc

brucevde
Nov 14th, 2008, 12:13 PM
Link the Employer table to the View.
Open the Link Options screen and set it to a Left Join.
Add this to the Record Select Formula
IsNull({vwSPCompanyInfo.employer_unique})

tuber
Nov 14th, 2008, 01:13 PM
I didn't work with Left Join, but it did with the Right Join. And it came up with the correct values. But my Crystal has always been backwards, but any way, Thanks again brucevde!