Bob, Howie

Thanks.  It works now.  I got rid of the quotes and the trim.  I also 
changed the datatype for the field to varchar.

Jacob

At 02:58 PM 4/12/00 -0400, you wrote:
>I think it's because you are evaluating the parameters as character values
>rather than numbers.  When you enclose the values in double quotes, you are
>forcing CF to look at them as characters.  Try taking away the double
>quotes.  CF will then evaluate the values in the manner it deems most
>appropriate.  By the way, you would probably be better off changing those
>fields to number fields (if they aren't already) and doing away with the
>need for the TRIM function.
>
>-------------------------
>Bob Hendren
>BrainKeepers
>E-Commerce - Internetworking - Information Systems
>404-375-2258
>[EMAIL PROTECTED]
>
>-----Original Message-----
>From: Jacob [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, April 12, 2000 2:03 PM
>To: [EMAIL PROTECTED]
>Subject: Number comparing
>
>
>When I run this:
>
><cfif trim(cprlookup.cpr_rating) gte "7" and trim(cprlookup.cpr_rating) lt
>"9">
><cfset cpr_ribbon = "red2ndshad.gif">
><cfelseif trim(cprlookup.cpr_rating) gte "9">
><cfset cpr_ribbon = "blue1stshad.gif">
></cfif>
>
>I keep getting blue1stshad.gif for 8.5.
>
>If the number is an 8, it gives it red2ndshad.gif. If the number is an 9,
>it gives it blue1stshad.gif.
>
>The column for the SQL server is as follows:
>
>Column Name             Datatype        Length  Precision       Scale
>CPR_Rating              decimal         9       18              0
>
>Any suggestions?
>
>Thank You
>Jacob
>
>----------------------------------------------------------------------------
>--
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>
>------------------------------------------------------------------------------
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.


------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to