You're using string operations on numeric values; I assume MS-SQL is able to
resolve the discrepancy, but ODBC can't.

This statement works through CF: SELECT LEFT(123456,3) + '1' + right(123456
, len(123456) -4) as test.

You could put the whole thing in a "CAST" statement, or you could use math
functions on your data:
select round(123456,-3) + (1*100) + (123456 % 100) as test





-----Original Message-----
From: Adrian Cesana [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 12:52 PM
To: CF-Talk
Subject: RE: update numeric SubString?


Anyone have any idea as to why this would result in a <NULL> when run thru
CF but when executed thru T-SQL works ok???


UPDATE mytable SET
switch =  left(switch, 3) + '1' + right(switch , len(switch) -4)
WHERE po = 236107

DB: SQL7 (switch = numeric field)
CF: 4.01


-Adrian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to