G
Guest
I'm trying to create queries in Access 2003. Every time I save my code,
Access truncates the code and destroys my query (and as a result, when I try
to run the query, it fails with an error message). Then I open it back up in
design mode and I see that it truncated the query when I saved it. I'm not
talking about it truncating the code when I try to run it. It's truncates it
during a save. And there isn't much code there. They are SQL queries that I
create by going into design mode and then switching to SQL view. I'm thinking
that there must be some sort of bug in Access. I did somehow manage to get
just one query to stay together without being destroyed. But I've tried doing
a copy and paste of my code to a new query and when I save the new query,
Access truncates it. When I tried to just highlight my one good query and
right-click on it and do a Save As, when it saves the new query, it truncates
the code again. This is causing me serious problems and is keeping me from
getting my job done. Below is the code of my one good query....that I can't
duplicate without Access truncating the code again. I really need some help.
SELECT RN, COUNT(1) AS Cnt
FROM [SELECT DISTINCT LCase(RuleName) AS RN
FROM admin
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM dmz2
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM dmz
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM dmzadmin
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM external
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM foreign
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM internaldmznetmaps
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM loadbalancer
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM outbound
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM outboundcustom
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM vpn
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM wwan]. AS Selected_Recs
GROUP BY Selected_Recs.RN;
Access truncates the code and destroys my query (and as a result, when I try
to run the query, it fails with an error message). Then I open it back up in
design mode and I see that it truncated the query when I saved it. I'm not
talking about it truncating the code when I try to run it. It's truncates it
during a save. And there isn't much code there. They are SQL queries that I
create by going into design mode and then switching to SQL view. I'm thinking
that there must be some sort of bug in Access. I did somehow manage to get
just one query to stay together without being destroyed. But I've tried doing
a copy and paste of my code to a new query and when I save the new query,
Access truncates it. When I tried to just highlight my one good query and
right-click on it and do a Save As, when it saves the new query, it truncates
the code again. This is causing me serious problems and is keeping me from
getting my job done. Below is the code of my one good query....that I can't
duplicate without Access truncating the code again. I really need some help.
SELECT RN, COUNT(1) AS Cnt
FROM [SELECT DISTINCT LCase(RuleName) AS RN
FROM admin
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM dmz2
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM dmz
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM dmzadmin
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM external
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM foreign
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM internaldmznetmaps
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM loadbalancer
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM outbound
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM outboundcustom
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM vpn
UNION ALL
SELECT DISTINCT LCase(RuleName) AS RN
FROM wwan]. AS Selected_Recs
GROUP BY Selected_Recs.RN;