Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / February 2008

Tip: Looking for answers? Try searching our database.

another union query question...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steven Cheng - 13 Feb 2008 03:03 GMT
below is the union query statement that had been built.  up until last week,
it had been working, however, for some reason, it is not cooperating:

SELECT A.EMPIDValidation AS EMPLOYEE, [Period ending] AS PEREND, "WEEK" AS
TIMECARD, 2 AS CATEGORY, A.ecode AS EARNDED, "" AS UNI, A.weekending AS
EARDEDDATE, A.Store AS GLSEG1, format(A.Regular,"0.00") AS HOURS, "TRUE" AS
WEEKLYNTRY, GL AS EXPACCT
FROM qryTimeCard_Stage2_Regular AS A WHERE (A.Regular<>0) AND GL<>""

UNION SELECT B.EMPIDValidation AS EMPLOYEE, [Period ending] AS PEREND,
"WEEK" AS TIMECARD, 2 AS Category, "OT" AS EARNDED, "" as UNI, B.weekending
AS EARDEDDATE, B.Store AS GLSEG1, format(B.OTHours_V,"0.00") AS HOURS, "TRUE"
AS WEEKLYNTRY, GL as EXPACCT FROM qryTimeCard_Stage2_OT AS B WHERE
(B.OTHours_V<>0);

I have tried to run them the two tables independently and they are okay.  
nothing has changed for the data structure.  the only funny point is that it
is creating a databse1 file in the same folder.  Error message is pointing at
the fact that the recordset is readonly and thus not allowing for it to be
run (invalid operation).
MichaelRay - 27 Feb 2008 21:44 GMT
Are you saying that this union query does not run as a Select query, but that
both halves of it run correctly as select queries?

>below is the union query statement that had been built.  up until last week,
>it had been working, however, for some reason, it is not cooperating:
[quoted text clipped - 16 lines]
>the fact that the recordset is readonly and thus not allowing for it to be
>run (invalid operation).
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.