Link to home
Start Free TrialLog in
Avatar of Mahalakshmi Murugesa
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
ASKER CERTIFIED SOLUTION
Avatar of Joe Woodhouse
Joe Woodhouse

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial