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 / May 2005

Tip: Looking for answers? Try searching our database.

transform query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mario Krsnic - 18 May 2005 22:34 GMT
Hello everybody,
I have in a table the saved absences of persons. So:
name, BeginAbs, EndAbs
John, 1.5.2005, 12.5.2005

To get the absences for a certain date I use this query:
SELECT name FROM absences
WHERE MyDate Between BeginAbs And EndAbs;

This works fine. Now I would like to transform the query using pivot feature
to get a month view of
absences for every day and every person.
How to do it?
Thanks
Mario
Duane Hookom - 19 May 2005 05:07 GMT
What I have done in the past is create a table with all dates (tblAllDates
and field TheDate). Consider starting with a query that creates separate
records for each date.
Something like:
SELECT Name, BeginAbs, EndAbs,
tblAllDates.TheDate
FROM tblAllDates, tblAbss
WHERE (((tblAllDates.TheDate) Between [BeginAbs] And [EndAbs]));

Signature

Duane Hookom
MS Access MVP

> Hello everybody,
> I have in a table the saved absences of persons. So:
[quoted text clipped - 12 lines]
> Thanks
> Mario
Mario Krsnic - 19 May 2005 09:15 GMT
> What I have done in the past is create a table with all dates (tblAllDates
> and field TheDate). Consider starting with a query that creates separate
> records for each date.

Sorry. I did not understand. How do you mean the dates enter the table
tblAllDates?
Now I have BeginAbs, EndAbs for a certain person and I have an empty table
tblAllDates. I need the dates in the table tblAllDates to be able to perform
your query?!
Cheers
Mario

> Something like:
> SELECT Name, BeginAbs, EndAbs,
[quoted text clipped - 18 lines]
> > Thanks
> > Mario
Duane Hookom - 20 May 2005 04:48 GMT
You need to fill the table tblAllDates with every possible date in your
application. You can use code to append the records or possibly create them
in Excel and paste them into the table.

Signature

Duane Hookom
MS Access MVP

>> What I have done in the past is create a table with all dates
>> (tblAllDates
[quoted text clipped - 32 lines]
>> > Thanks
>> > Mario
 
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.