Mike - you can setup the text driver to auto-cast the datatypes

go to your dsn's properties ODBC Text Setup >> Options >> Define Format

>From there you can setup the datatype of each of the csv's columns.

> -----Original Message-----
> From: Mike Kear [mailto:[EMAIL PROTECTED]]
> Sent: 04 December 2001 01:31
> To: CF-Talk
> Subject: Manipulating a text file ... how to convert a type?
> 
> 
> I'm working with a text file, using it as a datasource,  that 
> an information
> provider puts into our site daily.  One of the fields  is 
> "InterestRate" and
> the contents are values like "14.0005%" and "8.5000%".  There 
> is no problem
> as long as I just want to display this value.
> 
> But now I want to sort the rows on the interest rate, and of 
> course since
> it's a character field, it sorts 14.0005% as lower than 
> 8.5000%.    How can
> I convert the value from characters to numbers in the SQL?
> 
> 
> We're using the Microsoft .txt/.csv driver.  Since the file 
> is put in our
> site daily by the information provider, I can't change the 
> file at all,
> because it's going to be replaced with a new one tomorrow.
> 
> 
> 
> Cheers,
> Mike Kear
> AFP Webworks,
> Windsor, NSW, Australia
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to