Results 1 to 3 of 3

Thread: [RESOLVED] Help with Linking/ Getting NOT EXISTS

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2007
    Location
    Iowa
    Posts
    298

    Resolved [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"

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    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})

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2007
    Location
    Iowa
    Posts
    298

    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
  •  



Click Here to Expand Forum to Full Width