Query to Parameter Query ?

D

D. Stacy

SELECT (#10/15/2008#)+TimeSerial(0,[num],0) AS time_
FROM TblMinPerDay, TblDates;


I would like for this query to allow the user to select a data at runtime.

Can someone suggest how this query can be modified to achieve this goal?

The TblMinPerDay is just a numbers table 1 to 1440; the TblDates is just a
date data table.

Thanks
 
K

KARL DEWEY

I would like for this query to allow the user to select a data at runtime.
Do you mean Date?

I assume that [num] is from TblMinPerDay but what is the purpose of TblDates
in this query?
 
M

MGFoster

D. Stacy said:
SELECT (#10/15/2008#)+TimeSerial(0,[num],0) AS time_
FROM TblMinPerDay, TblDates;


I would like for this query to allow the user to select a data at runtime.

Can someone suggest how this query can be modified to achieve this goal?

The TblMinPerDay is just a numbers table 1 to 1440; the TblDates is just a
date data table.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Parameters are indicated like this (theDate is the parameter):

PARAMETERS theDate Date;
SELECT theDate+TimeSerial(0,[num],0) AS time_
FROM TblMinPerDay, TblDates;

As Karl Dewey asks "What is the purpose of tblDates?" since you don't
use it in the SELECT clause. Your result set will be all the rows in
tblDates X all the rows in tblMinPerDay, a Cartesian product.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSZR144echKqOuFEgEQIobQCfQwi3BtssGyo5bwNmoFOvhX+A+boAnROg
Q8/eQNx35Pn2g/hQuUSxfIQD
=BmG3
-----END PGP SIGNATURE-----
 

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