just to make it easier on myself I'd reverse it and store 0.75 and 0.5 in
the db field
and let the code do the math on ouput where i need to display them as 3/4
and 1/2

then you could just use greater than and less than in your query

where width > #val(FORM.Width1)# and < #val(FORM.Width2)#

----- Original Message -----
From: "Bill Grover" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 4:29 AM
Subject: RE: SQL Question...


> I don't believe there is a direct conversion available for your field.  If
you are using SQL 2000 you can write a function that will take your field,
split it at the '/' and then do the math returning the numeric result.  You
can then use that in your select statement.
>
> ______________________________________________________
>
> Bill Grover
> Supervisor MIS                  Phone:  301.424.3300 x3324
> EU Services, Inc.               FAX:    301.424.3696
> 649 North Horners Lane          E-Mail: [EMAIL PROTECTED]
> Rockville, MD 20850-1299        WWW:    http://www.euservices.com
> ______________________________________________________
>
>
>
> > -----Original Message-----
> > From: Che Vilnonis [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 13, 2003 1:17 PM
> > To: CF-Talk
> > Subject: SQL Question...
> >
> >
> > In my db I've got a varchar column called 'width'.
> > It has values like 3/4" or 5/8", etc.
> >
> > I'd like to write a where clause in a SQL query that does
> > something like this:
> >
> > WHERE 0=0
> > AND (WIDTH BETWEEN #FORM.Width1# AND #FORM.Width2#)
> > [i.e. -- (AND (0.75 BETWEEN 0.5 AND 1))]
> >
> > What do I need to do to make this work? Covert? Cast?
> >
> > Che Vilnonis
> > Application Developer
> > Advertising Systems Incorporated
> > 8470C Remington Avenue
> > Pennsauken, NJ 08110
> > p: 856.488.2211
> > f: 856.488.1990
> > www.asitv.com
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to