Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Crystal Reports: Using right table as a filter to left table data

Posted on 2013-06-21
4
Medium Priority
?
586 Views
Last Modified: 2013-06-21
I have two tables joined in my report.  The Left table contains all the data elements (fields) I want to display in my report.  The right table contains a list of data (a single field) with values matching some of the entries in left table for the linked field (PATIENT_NAME).

I would like to display all PATIENT_NAME entries NOT found in the right table. essentially using the right table as a list of PATIENT_NAME entries to filter out of the report.  If the name exists in the right table I do not want that name displayed on the report.

How can I best accomplish this request?

Thnaks,
0
Comment
Question by:jbrazie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 2000 total points
ID: 39266366
Left outer join the tables and put ISNULL(PATIENT_NAME) in your record selection criteria
0
 
LVL 18

Expert Comment

by:vasto
ID: 39266401
Use Left join and put in the where clause check for PATIENT_NAME = null

the corresponding SQL will look like this:

SELECT t1.*
FROM Table1 t1 LEFT HOIN Table2 t2 ON t1.PATIENT_NAME=t2.PATIENT_NAME
WHERE t2.PATIENT_NAME is null
0
 
LVL 18

Expert Comment

by:vasto
ID: 39266461
I had to refresh before to post this.  rhinok's post said everything
0
 

Author Closing Comment

by:jbrazie
ID: 39266593
So simple when you put it that way...

It worked perfectly thank you so much! Rhinok you are the MAN (or woman)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question