I am querying a text file and getting some annoying behaviour, when I
have a field containing the value "692619037803123" for example it is
reading it as a float value and then converting it into
6.92619037803E+013 for storage in my MSSQL database as a varchar.  I
need it to be a varchar because some values will be "00123456789" and
I need to maintain the leading "0" characters.

I have tried modifying the text file query to...

SELECT *, cast(['the-field'] AS VarChar(20)) AS theField
FROM   theTextFile

but that is throwing an error "Syntax error (missing operator) in
query expression", I have also tried using convert() but that throws
an undefined function error.

Does any one know how I can get the text file odbc driver to read this
field as a varchar?

-- 
James Smith
IT Director
Music Express Ltd

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305221
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to