FYI, that will sometimes fail.
For example:
declare @s varchar(25)
set @s = '-'
select cast(@s as float) where isnumeric(@s) = 1
How try with integer instead of float.
Bye,
Delbert Glass
"Andrew John" <aj@DELETEmistrose.com> wrote in message
news:3f********@duster.adelaide.on.net...
Meh,
You need a 2nd column, temporarily at least:
Update MyTable
set fltAmount = cast( vchAmount as float )
where isnumeric( vchAmount ) = 1
Then check the ones that dont update for garbage.
Regards
AJ
"meh" <me**@hotmail.com> wrote in message
news:w1******************@nwrddc01.gnilink.net...
I have imported data from excel file. When data came to SQL table, the
type of AMOUNT column was varchar. I tried to convert and cast amount type
of amount column to number type but it does not allow me to convert.
What is the best way of importing data into SQL and type stays the same
as it was in excel file ?
Or anyone has any better solution, please let me.
Thanks.