I am trying to write a query to show me every thing from table 1 (table one is called equipment) and only the information from table 2 (called equip_out) related to the equipment item with some restrictions
equipment
equip_location = variable
deleted = 0
equip_out
equip_in = null
Code:
SELECT equipment.equip_name, equip_out.student_id, equip_out.time_out
FROM equipment
full outer JOIN equip_out ON equipment.equip_id=equip_out.equip_id
where equipment.deleted = 0
there is a column called time_in in equip_out that should only be joined with the equipment list if that field is null. the equipment list should include all fields where the column deleted is 0 (bc of logging issues i do not want anything removed ever) and equip_location = variable (variable is passed in when the query is built in
vb)
this one has me stumped, if its not possible just let me know. i am going to keep working on it and will post a solution if i find one.
thanks in advance