J jocph Member Local time Tomorrow, 00:42 Joined Sep 12, 2014 Messages 61 Jun 23, 2020 #1 Let's say I have 2 tables, tblProcess and tblWeld, as shown in the figures below: How do I create the sql so that what I get in ProcessA and ProcessB is the corresponding ProcessCode without doing DLookup?
Let's say I have 2 tables, tblProcess and tblWeld, as shown in the figures below: How do I create the sql so that what I get in ProcessA and ProcessB is the corresponding ProcessCode without doing DLookup?
J jocph Member Local time Tomorrow, 00:42 Joined Sep 12, 2014 Messages 61 Jun 23, 2020 #2 Ok, got it! Found out you can add the lookup table twice in the query builder. SQL: SELECT tblWeld.WeldNo, tblProcess.ProcessCode, tblProcess_1.ProcessCode FROM (tblWeld INNER JOIN tblProcess ON tblWeld.ProcessA = tblProcess.ProcessID) INNER JOIN tblProcess AS tblProcess_1 ON tblWeld.ProcessB = tblProcess_1.ProcessID;
Ok, got it! Found out you can add the lookup table twice in the query builder. SQL: SELECT tblWeld.WeldNo, tblProcess.ProcessCode, tblProcess_1.ProcessCode FROM (tblWeld INNER JOIN tblProcess ON tblWeld.ProcessA = tblProcess.ProcessID) INNER JOIN tblProcess AS tblProcess_1 ON tblWeld.ProcessB = tblProcess_1.ProcessID;
D Deleted member 147267 Guest Jun 23, 2020 #3 jocph said: Ok, got it! Found out you can add the lookup table twice in the query builder. Click to expand... Hacks and work arounds are going to be the norm for you because your design is wrong, as Pat said. Well, actually I think it was implied, but I agree anyway.
jocph said: Ok, got it! Found out you can add the lookup table twice in the query builder. Click to expand... Hacks and work arounds are going to be the norm for you because your design is wrong, as Pat said. Well, actually I think it was implied, but I agree anyway.