Sum of two union query

R

Ray

Hello, I am having problem summing two union query. I can
do this is Access 2000 but 2002 crashed when I run it.
this is what I am adding. SELECT X.ProdCode, Sum
(DlrsInvent) AS DlrsOnHand, Sum(DlrsDemand) AS
TotDlrsDemand
FROM(SELECT ProdCode, DlrsInvent, DlrsDemand FROM TABLEONE
UNION ALL SELECT ProdCode, DlrsInvent, DlrsDemand FROM
TABLETWO
)AS.X
GROUP BY ProdCode
Thanks Ray
 
E

Eric Butts [MSFT]

Hi Ray,

You state that you are able to perform the Union query within Microsoft
Access 2000 but not 2002. Are both versions on the same machine? If not,
then compare the file version of the Microsoft JET Database Engine
(msjet40.dll). Very possible the file versions are different.

For the updated version of the JET Engine see:
http://support.microsoft.com/?id=239114

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights


--------------------
| Content-Class: urn:content-classes:message
| From: "Ray" <[email protected]>
| Sender: "Ray" <[email protected]>
| Subject: Sum of two union query
| Date: Tue, 8 Jun 2004 17:42:24 -0700
| Lines: 13
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| thread-index: AcRNuqGMvgNKjrNBRaqV07APAH3xHw==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.access.queries
| Path: cpmsftngxa10.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.access.queries:203247
| NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
| X-Tomcat-NG: microsoft.public.access.queries
|
| Hello, I am having problem summing two union query. I can
| do this is Access 2000 but 2002 crashed when I run it.
| this is what I am adding. SELECT X.ProdCode, Sum
| (DlrsInvent) AS DlrsOnHand, Sum(DlrsDemand) AS
| TotDlrsDemand
| FROM(SELECT ProdCode, DlrsInvent, DlrsDemand FROM TABLEONE
| UNION ALL SELECT ProdCode, DlrsInvent, DlrsDemand FROM
| TABLETWO
| )AS.X
| GROUP BY ProdCode
| Thanks Ray
|
|
|
 
R

Ray

Hello Eric,
I solve this problem. I was using long names with under
score and numbers. When I made both tables with
friendlier names, all worked fine. I didn't need to
upgrage anything. here is an example of the names I used:
DaysofStock_FgDick2 - same for for the other take with
different number. I changed do daysstockA and daysstockB.


thanks for replying to me mail.
Ray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top