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

Join table problem

Status
Not open for further replies.

snowboardr

Programmer
Feb 22, 2002
1,401
PH
I am not doing something right i know, the join I am doing here works fine however I would like to still show the bid even if the project doesn't exist..

Code:
	sqlBid= "SELECT ibid,ipid,icompany, iaddress, icity, istate, izip, iemail, iname, iphone, idateexp, idate, ilicence, iwork, iliability," _
	& "pro.pid, pro.ptitle"_
	& " FROM ibids, project as pro WHERE ibids.ibid=" & queryBid & " AND pro.pid=ibids.ipid"

Thanks,

Jason
 
You would need to use an outer join, such as:
[tt]
FROM ibids LEFT JOIN project pro ON pro.pid=ibids.ipid
WHERE ...
[/tt]
That way the fields from any non-existent project records will be null.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top