Quantcast
Channel: Answers for "How to show another tables data in a specific column based on a query"
Viewing all articles
Browse latest Browse all 4

Answer by Oleg

0
0
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

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images