>
>declare @counter int
>set @counter = 1
>while @counter < 100000
> begin
> insert into Test1 values (@counter, 'Counter ' + convert(varchar(10),@counter))
> insert into Test2 values (@counter, @counter, @counter,'Counter' + convert(varchar(10),@counter))
> set @counter = @counter +1
> end
>
>I didn't knew about this behavior of CAST().
>Unfortunately i can't test this in SQL Server 2000, but in SQL Server 2005 using CAST() function raise an error.
Yes, interesting. I was reading help on CAST/CONVERT to find it mentioned somewhere and I didn't see it. Funny we found this problem today working on a different issue. And I'm sorry, I still didn't try your example.
Got busy trying to clear fields in ASP.NET page - could not figure this out on my own so far.
If it's not broken, fix it until it is.
My Blog