3

I have the following query:

SELECT st.part_location_id_from, st.part_location_id_to, st.loginid
FROM stock_transfer AS st, stock_transfer_confirmation AS stc
WHERE st.id = stc.stock_transfer_id
AND stc.confirmed = 0;

It retrieves all unconfirmed stock transfers. I would like to replace the id from part_stock_location_id_from and part_stock_location_id_to with the name of the location which I have in another table like:

    id descr
    1  Warehouse A
    2  Warehouse B
    2  Store A

etc.

is there a way to get this in one query?

Bart
  • 565
  • 2
  • 7
  • 24

1 Answers1

0

The answer of sagi did not really work correctly.

I've found a much simpler and working solution in another thread:

SQL Replace multiple variables from another table in query result

Bart
  • 565
  • 2
  • 7
  • 24