G
GD
I'm trying to run a make table bringing the ID, InvNo & PONo fields from
T09_DupInvs1 table, and I want to rank the PONo field (preferably in order by
ID [autonumber]). The result of the SQL below is the ID, PONo and Rank
fields, but no InvNo. And the rank is 1 all the way down its field. What am
I doing wrong? I'm very new to SQL. THANKS!!!!
SELECT Q.ID, Q.InvNo, Q.PONo (SELECT COUNT (*) FROM [T09_DupInvs1] Q1
WHERE Q1.[InvNo] = Q.[InvNo]
AND Q1.[PONo] = Q.[PONo]
AND Q1.[ID] < Q.[ID]) +1 AS Rank INTO T10_DupInvs2
FROM T09_DupInvs1 AS Q
ORDER BY Q.ID;
T09_DupInvs1 table, and I want to rank the PONo field (preferably in order by
ID [autonumber]). The result of the SQL below is the ID, PONo and Rank
fields, but no InvNo. And the rank is 1 all the way down its field. What am
I doing wrong? I'm very new to SQL. THANKS!!!!
SELECT Q.ID, Q.InvNo, Q.PONo (SELECT COUNT (*) FROM [T09_DupInvs1] Q1
WHERE Q1.[InvNo] = Q.[InvNo]
AND Q1.[PONo] = Q.[PONo]
AND Q1.[ID] < Q.[ID]) +1 AS Rank INTO T10_DupInvs2
FROM T09_DupInvs1 AS Q
ORDER BY Q.ID;