Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update multi row
Message
 
To
28/07/2007 10:26:42
Mazahir Naya
Kuwait United Co.
Kuwait, Kuwait
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
01244357
Message ID:
01244358
Views:
19
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform