• ..continued ( sorry pressed the wrong key )

     A stored procedure from SQL server is called that does the following:

    a. creates a cursor that determines the distinct values for field LSeries in tbl_group

    b. if we call the distinct value as  YYY, the procedure looks up table tblfilename_YYY and update all the matching rows from tbl_group to this table.

    The problem arises when there is more than one distinct value of Lseries, which means when more than one table has to be update, the procedure times out even of there are 10,000 rows. But if the procedure has only one discitnct value of Lseries it can go on for even 150,000 records.

    Hence I am trying to re-write to code diferently !!

    Thanks again for your help.