how to get the result and write a query for time value in

G

Guest

hi,
iam using msaccess 2003
my table structure is

IDs
HourFrom (Number,single)
HOurto (Number,single)

the Data looks like

ID HourFrom HOurto

1, 12.00 13.99
2, 7.30 8.99
3 8.00 10.99
4 16.00 17.99
5 18.00 21.00
6 17.00 18.99
7 18.20 21.99

i want to get ID Value, whose value is 18.21(between HourFrom, HOurto)
the results should be 5,6,7 only.

how to write a sql query, pls help me
 
G

Guest

Hi,

You did a very good job of explaining the problem except that you forgot the
table name. ;-) Therefore you need to insert the proper table name in the SQL
below.

SELECT Rt.ID, Rt.HourFrom, Rt.HOurto, 18.21 AS TheValue
FROM Rt
WHERE (((18.21) Between [HourFrom] And [HOurto]));

This kind of query is counter-intuitive as you have to put the fields in the
criteria and what you are looking for up in the fields.
 

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