I noticed if the number was at the end of a sentence, it would not work. For example 'this is 9.00.', the period would mess it up. So I added a check for that right before the check for more than 1 decimal:
if right(@charnum,1) = '.' begin
set @charnum = left(@charnum,len(@charnum)-1)
end
-- don't convert numbers with more than 1 decimal
if len(replace(@charnum,'.','. ')) - len(@charnum) <= 1
begin
-- convert to float, insert into table
insert into @numbers values (@cnt,convert(float,@charnum))
end
That seemed to fix most of it, but I still have a problem with it now converting the string '9.00.' into 90. I have not had time to work on this again, so if you know a solution, I would be thankful!
[font="Courier New"]____________________________________________________________________________________________
Remember as you walk down lifes road, don't forget to stop and pee on the bushes - Thordog[/font]