473,416 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Complex Access Query: Indicate Start and End of new 'Session'

Hey everyone, this one is a doozie (for me at least)

I have a large table (>1M entries) that contains Client IDs and Visit Dates

I am trying to create a query that will indicate when a client starts a new session and the date of, and when the client ends a session and the date of termination.

A session is ended if the client is inactive for X (say 21) days. I have done this by exporting the table to Excel and writing code in Excel, but I would like a solution to be done in Access if possible (much cleaner) so I don't have to keep jumping between applications.

Attached is the basics of what I have done in Excel. I then created a 'condensed' worksheet with just the 'Start' and 'End' dates for each patient.

Cell M1 contains the number of days that I want to classify as the cut-off for a new session (X, or right now 21)

I would be surprised if I asked my question in a clear manner, so please ask more questions so I can help people understand my problem.

This site is great, and I love the help I have gotten before. Thank you so much for your time,

-Chris
Attached Images
File Type: gif sj1.gif (12.8 KB, 134 views)
File Type: gif sj2.gif (13.3 KB, 151 views)
File Type: gif sj3.gif (11.7 KB, 140 views)
Aug 23 '07 #1
3 1635
Rabbit
12,516 Expert Mod 8TB
Isn't this related to this?
Aug 24 '07 #2
Isn't this related to this?
Yup, it is for the same project, but the needs of the query are a bit different, so I put it in a new thread. Should I delete this one and repost the question in the old thread?

-Chris
Aug 24 '07 #3
Rabbit
12,516 Expert Mod 8TB
No, it's fine if it's a different question. But if it's related to an older post it would help the people reading this to be able to see it. Did the query ever work? I don't think the count will work but the query before the count should at least give you the first record of each session.

If you then take that query, you should be able to use it as a subquery to get your start and end periods. I know the query before I implemented the count works, I tested it with some sample data. But the rest is off the top of my head but it should work.
Aug 24 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Frnak McKenney | last post by:
Back when computer dinosaurs roamed the earth and the precursors to today's Internet were tiny flocks of TDMs living symbiotically with the silicon giants, tracking access to data processing...
3
by: Jon Ole Hedne | last post by:
My Access 2002-application need to work with tables from both Oracle and Access. To solve this, I want to run some querys on three views in Oracle and import the results into temporary...
0
by: totierne | last post by:
comp.databases.ms-access, I want to know how to use Oracle views with session variables in Access. The parameterised views in access, are migrated to views with per session variables. The...
13
by: royaltiger | last post by:
I am trying to copy the inventory database in Building Access Applications by John L Viescas but when i try to run the database i get an error in the orders form when i click on the allocate...
5
by: Wired Hosting News | last post by:
I tried to be breif and give a scenario so as not to be overlooked because it was soooo long. Let me give you real world. I am a manufacturer of goods and produce 11 items that are distributed...
8
by: Dave | last post by:
Hi all, I want to build a site which will allow me to restrict a users access based on assigned privileges and render pages with user-specific information. Some other features I would like to...
37
by: Chris Gilpin | last post by:
Hey everybody! This is my first post here, so hopefully I will be able to make it as clear as possible. I have a very large database (over 1,000,000 entries) and my current goal is to find out the...
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
23
by: Gloops | last post by:
Hello everybody, Is anyone able to give me some indications about how to develop an Access interface for an Oracle database ? I dispose of Access 2003 (11.6566.8107) SP2, Oracle 9i 9.2.0.1.0...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.