Because your PC Table has 2 columns storing the printer IDs, you just need to join this table with your printer table twice, once for each ID. Here is the script:
select
pc.Asset, printer.[Path] PrinterID1, printer2.[Path] PrinterID2
from PC_Table pc inner join Printer_Table printer
on pc.PrinterID1 = printer.PrinterID
inner join Printer_Table printer2
on pc.PrinterID2 = printer2.PrinterID;
go
The above produces the data you need:
Asset PrintID1 PrintID2
----------- ---------- ----------
78956 pathXYZ path465
73532 pathABC path234
94324 path234 path465
Hope this helps,
Oleg
Trending Articles
More Pages to Explore .....