Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > SQL Question

Reply
Thread Tools

SQL Question

 
 
Jim Holmes
Guest
Posts: n/a
 
      03-23-2005
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


 
Reply With Quote
 
 
 
 
Jim Holmes
Guest
Posts: n/a
 
      03-23-2005
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

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:(E-Mail Removed)...
> sql = "select * from tableName where field < " & yourValue
>
>
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Jim Holmes" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >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
> >
> >

>
>



 
Reply With Quote
 
 
 
 
PiGei
Guest
Posts: n/a
 
      03-23-2005
I think yo have to eliminate the '

PGei

"Jim Holmes" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> news:(E-Mail Removed)...
>> sql = "select * from tableName where field < " & yourValue
>>
>>
>> --
>> Curt Christianson
>> Site & Scripts: http://www.Darkfalz.com
>> Blog: http://blog.Darkfalz.com
>>
>>
>> "Jim Holmes" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >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
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Reference, SQL Queries, SQL help ecoolone ASP .Net 0 01-03-2008 10:58 AM
Do the Self-Paced Training Kits: Microsoft SQL Server 2000 include Eval copy of SQL Server? Brian Whiting Microsoft Certification 2 12-29-2005 04:24 AM
DBI SQL column datatype not jiving with SQL statement requirement dna Perl 1 01-18-2004 04:15 PM
Re: SQL statement working in SQL Server but not in .aspx.cs page William \(Bill\) Vaughn ASP .Net 0 08-21-2003 10:41 PM
Newbie SQL question: Break SQL into different SELECTs or keep as one Jules ASP General 6 07-15-2003 12:47 PM



Advertisments