SQL Question

J

Jim Holmes

I have an Access table with a column of ascending values. I am trying to
find the value in that column that is less than a calculated variable (kind
of like the vlookup function in Excel). Haven't had any success in writing
an sql statement or finding an example. Could someone point me in the right
direction? Thanks Jim
 
J

Jim Holmes

Unfortunately, the code below only selects the first item in my table
instead of the 63rd (which is the first value less than 57.13).
value=57.13
mySql="SELECT * FROM monthly WHERE a_n < '"&value&"'"
Jim
 
P

PiGei

I think yo have to eliminate the '

PGei

Jim Holmes said:
Unfortunately, the code below only selects the first item in my table
instead of the 63rd (which is the first value less than 57.13).
value=57.13
mySql="SELECT * FROM monthly WHERE a_n < '"&value&"'"
Jim
 

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

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top