Hi, I was wondering if someone can shed some light on this, not sure if a self join is the solution:
I have the following table, lets call it TEC.PARTSDATA :
Part Number, Part Desc, Fwd To, Fwd Part Number, Vendor
4321, XYZ, Y, 3456, TRWS
2112, FTYH, N, ‘’, TRWS,
1234, ZYZ, N, ‘’, RTYF,
3456, SDE, N, ‘’, TRWS,
9687, EWE, Y, 0987, TRWS,
8888, YYR, N, ‘’, RRRR,
0987, EEE, N, ‘’, TRWS,
7777, TYT, Y, 0495, ETYU,
0495, RRQ, N, ‘’, ETYU
Possible using a self join and where Vendor = TRWS, I would like to get the following result set:
Part Number, Part Desc, Fwd To, Fwd Part Number, Part Desc
4321, XYZ, Y, 3456, SDE
2112, FTYH, N, ‘’, ‘’,
3456, SDE, N, ‘’, ‘’,
9687, EWE, Y, 0987 EEE,