A "days at" query
From: Eel <eel_at_javabox.com>
Date: 30 Jan 2002 18:51:14 -0800
Message-ID: <a62a408.0201301851.2cfba420_at_posting.google.com>
Hi,
I'm trying to create an sql query on an ms-access database that will give me the "days at" a particular location in a factory. If I have a simple table like:
Date: 30 Jan 2002 18:51:14 -0800
Message-ID: <a62a408.0201301851.2cfba420_at_posting.google.com>
Hi,
I'm trying to create an sql query on an ms-access database that will give me the "days at" a particular location in a factory. If I have a simple table like:
"create table transactions
I can do something like "select date_in, date_out, date_out - date_in
as da from transactions"
This works, but I have a more complex requirement which is that in
cases where date_out = null, ie still at a location, I want to use
date_in DATE,
date_out DATE"
I know I can get the information from scrolling the records, but I'd like to do it purely in sql so my report doesn't have to do its own sorting.
Thanks! Received on Thu Jan 31 2002 - 03:51:14 CET