• Hello,

    Obviously I don’t know the structure of your DB, but would it not be possible to somehow replace the Cursor and Dynamic SQL with a Join on the NoSeriesMaster_Prefix table?

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group