|
-
Nov 14th, 2008, 11:07 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Help with Linking/ Getting NOT EXISTS
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!
Code:
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
Tuber
"I don't know the rules"
-
Nov 14th, 2008, 01:13 PM
#2
Re: Help with Linking/ Getting NOT EXISTS
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})
-
Nov 14th, 2008, 02:13 PM
#3
Thread Starter
Hyperactive Member
Re: Help with Linking/ Getting NOT EXISTS
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!
Tuber
"I don't know the rules"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|