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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show name when record from one table...

Status
Not open for further replies.

ZPBJ

Technical User
Jan 20, 2005
37
US
doesn't exist in the other.

For example

Each project has a list of preferred vendors (one table)

When offers come in they are tracked (another table)

How can I report who hasn't bid?

Thanks

__________________________________
Remember that time when I took the box? - Peter
 
SELECT yourFieldList
FROM [one table] LEFT JOIN [another table]
ON [one table].VendorID = [another table].VendorID
WHERE [another table].VendorID Is Null;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I copied and inserted this, the next problem is that project does not create place holders for bids by default. So if it isnull, it's not normally in the table (the 2nd table from above)

__________________________________
Remember that time when I took the box? - Peter
 
Have you tried this query with the real table and field names ?
The important point is LEFT JOIN

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
SELECT Vendor
FROM validVendors LEFT JOIN tblBidTracker ON [validVendors].VendorNumber = [tblBidTracker].Vendor
WHERE [tblBidTracker].Vendor Is Null;


__________________________________
Remember that time when I took the box? - Peter
 
SELECT Vendor
FROM validVendors LEFT JOIN tblBidTracker ON [validVendors].VendorNumber = [tblBidTracker].Vendor
WHERE [tblBidTracker].Vendor Is Null;

If that's your actual SQL, it'll always return a null set. You're asking to see the Vendor only if the Vendor is null.

Try SELECT VendorNumber ...

or some other field that'll actually show up from the validVendors table.

traingamer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top