Handleing NULL in selects

wxdqz

New Member
Im trying to do something like the following:

SELECT t.ticket,t.issue,c.name,p.product FROM ticket t, contact c, product p WHERE c.id=t.contact, p.id=t.product

This gives me 4 fields for every ticket, where i get the ticket, the issue, the contact person, and the product involved

This works great, expect when I have a null in t.product (a ticket is not associated to a perticular product--> products are not a mandatory field) the ticket never shows up. Im curious if anyone else has had problems like this and how they got around it.
 
Back
Top