D
dandydan9
When I try to delete the following "As" cluases from the query below
and save, Access reintroduces the "As" clauses.
INSERT INTO TGR_recharge_MIDTID
SELECT DISTINCT (a.pps_loc_id)*1 AS RECHARGE_MIDTID_ID
, a.pps_loc_id AS pps_loc_id
, midtid AS midtid
FROM WHSETL_LOCATIONS_MIDTID_MV AS a, whsetl_locations_mv AS b
WHERE cust_name In ('Kwik Trip','PREPAID SOLUTIONS IDT') And midtid Is Not
Null and a.pps_loc_id = b.pps_loc_id and not exists (select 1 from
tgr_recharge_midtid b where b.midtid=a.midtid)
ORDER BY 2, 1;
The "As" clauses cause the query to fail with a circular reference.
and save, Access reintroduces the "As" clauses.
INSERT INTO TGR_recharge_MIDTID
SELECT DISTINCT (a.pps_loc_id)*1 AS RECHARGE_MIDTID_ID
, a.pps_loc_id AS pps_loc_id
, midtid AS midtid
FROM WHSETL_LOCATIONS_MIDTID_MV AS a, whsetl_locations_mv AS b
WHERE cust_name In ('Kwik Trip','PREPAID SOLUTIONS IDT') And midtid Is Not
Null and a.pps_loc_id = b.pps_loc_id and not exists (select 1 from
tgr_recharge_midtid b where b.midtid=a.midtid)
ORDER BY 2, 1;
The "As" clauses cause the query to fail with a circular reference.