Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare ?? validate values in a field in one table to another table 1

Status
Not open for further replies.

MJD500

Technical User
Nov 9, 2001
33
CA
I know that validation should be done at the time the record is being submitted. BUT, we have a field that is not being validated at certain times and until we get it fixed, I need to be able to extract all records which do not have a valid value in this "System/application" field from the SRMIS table.

We do have a "System/application" table which has all the valid system/applications which can be entered into the database. Is there a way that I can extract all records with invalid values in the system/application field from the SRMIS table by doing some sort of search or lookup in the system/application table.

I hope this makes sense to someone...Any guidance would be appreciated....

Merci

Jocelyne
 
A simple method would be to do an Outer Join from the primary table to the lookup table. Any cases where the join fails, would have Null values in the columns of the lookup table.

Then filter the records to only those that have a Null in one of those lookup table columns (using IsNull())

Cheers,
- Ido ixm7@psu.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top