>dear all
>i am new in SQL Server 2005.i want to update multi raw in SQl Server Table.
>each raw update fields with new value.i am attaching code here.
>
>declare @counter int
>set @counter = 0
>
>SELECT * FROM [LFMTX].[dbo].[Toc]
>where Name like 'Pre-04/07/2006-4-%'
>
>---Need a Help from here
>
>while @counter < TOTAL RECORD VALUE
> begin
> UPDATE [LFMTX].[dbo].[Toc]
> SET [Name] = 'Pre-'+ cast(@counter as char)
> where Name like 'Pre-04/07/2006-4-%'
> set @counter = @counter + 1
>end
>
>
>Best Regards
>Mazahir
That would give you [Pre1] for ALL records that previously have 'Pre-04/07/2006-4-%' value.
What you want to do?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.