SSRS Report: pulling data from two different database servers in SSRS

  • To get values that exist in one table that do not exist in another you want to do an anti-join. You can accomplish with using WHERE NOT IN or WHERE NOT EXISTS. My favorite is the EXCEPT set operator:

    DECLARE @A TABLE (PPM_ID int);

    DECLARE @B TABLE (SDLC int);

    INSERT @A VALUES (1),(2),(3),(4);

    INSERT @B VALUES (3),(4);

    SELECT PPM_ID FROM @A

    EXCEPT

    SELECT SDLC FROM @B;

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • Thanks for your reply.

    But i want the SSRS report, not a SQL query.

    Please help me to do above scenario in SSRS.

  • Two datasources, two datasets then join with a lookup between both datasets in the tablix

Viewing 3 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply