November 14th, 2003, 10:05 AM
query help needed
I have these tables:
I'm trying to make a query the that I get the folowing result:
I need some help to get this right, I have no problem gettting everything except the timestamp there I don't know how to do.
November 14th, 2003, 12:06 PM
You could post what you have so far... but basically from what I've read I would use something like this:
SELECT pejl.pejl_id, customer.customer_Name, pejl_placement.placement_Name, level_logg.level_logg_timestamp
INNER JOIN tank ON level_logg.tank_id = tank.tank_id
INNER JOIN pejl ON tank.pejl_id = pejl.pejl_id
INNER JOIN pejl_placement ON pejl.pejl_placement_id = pejl_placement.pejl_placement_id
INNER JOIN customer ON pejl.customer_number = customer.customer_number
It seems from what you wrote that this are all 1 to 1 relationships, I think. Try that.
November 17th, 2003, 02:09 AM
thx worked lika a charm! had been thinking a little wrong...