[AccessD] Query sub query not working
Kaup, Chester
Chester_Kaup at kindermorgan.com
Tue Jul 23 13:08:46 CDT 2019
This query is asking for input rather than generating any. I have reviewed the table and name fields and must be missing something. Below is the SQL and a portion of the source table. Thanks for your assistance
SELECT [tbl Dual Completion Hierarchy].PID, [tbl Dual Completion Hierarchy].Hierarchy AS t
FROM [tbl Dual Completion Hierarchy]
WHERE ((([tbl Dual Completion Hierarchy].Hierarchy) In (SELECT Max([tbl Dual Completion Hierarchy].Hierarchy) from [tbl Dual Completion Hierarchy] as t2 where t2.PID =t.PID)));
tbl Dual Completion Hierarchy
PID
Hierarchy
42415343720000
18
42415343720001
18
42415343820000
5
42415343820001
5
42415343910000
5
42415343910001
5
42415344030000
18
42415344030001
18
42415344070000
17
42415344070001
2
42415344070001
3
42415344080000
5
42415344080000
13
42415344080001
5
42415344080001
13
More information about the AccessD
mailing list