Mahalakshmi Murugesa
asked on
How to do bulk update in sybase more faster?
#option3
update top(10) ud_$REAL_TABLE_NAME
set $UD_FIELD_NAME=@id
where $$UD_FIELD_NAME is NULL
while @@rowcount > 0
begin transaction
update top(10) ud_$REAL_TABLE_NAME
set $UD_FIELD_NAME=@id
where $UD_FIELD_NAME is NULL
if @@rowcount > 0
begin
print 'Successfully update @@rowcount no of rows'
commit transaction
end
end
go
set rowcount 0
go
update top(10) ud_$REAL_TABLE_NAME
set $UD_FIELD_NAME=@id
where $$UD_FIELD_NAME is NULL
while @@rowcount > 0
begin transaction
update top(10) ud_$REAL_TABLE_NAME
set $UD_FIELD_NAME=@id
where $UD_FIELD_NAME is NULL
if @@rowcount > 0
begin
print 'Successfully update @@rowcount no of rows'
commit transaction
end
end
go
set rowcount 0
go
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.