One thing you can do is to change the way they are determining if the table
exists or not. Don't select from sysobjects just use this:
IF OBJECT_ID(wrk_quicksaved_tablename) IS NOT NULL
You should also make sure the table names don't have spaces in them. If
there is a chance they will then add  around the object names.
Andrew J. Kelly
SQL Server MVP
"cynthia elms" <cynthia_elmshotmail.com> wrote in message
news:035201c3457f$70075e00$a301280aphx.gbl...> I have a stored procedure running on SQL 7.0 that works
> most of the time but a few times a week gets the following
> 'Could not find table named 'table id'. Check
> The way they have designed the procedure:
> wrk_table -- input parameter for table name
> wrk_quicksaved_tablename -- new name for table
> If exists(select * from dbo.sysobjects where id =
> object_id(wrk_quicksaved_tablename) and sysstat & 0xf=3)
> select wrk_exec=' Drop Table '
> select wrk_exec=wrk_exec + wrk_quicksaved_tablename
> Exec (wrk_exec)
> If the table exists already they drop it.
> The next part of the procedure they create dynamic SQL to
> do a select into wrk_quicksaved_tablename from wrk_table.
> I am wondering if they are getting spurious errors due to
> the fact that it is dynamic SQL. It doesn't happen all
> the time. I have tried to recreate the error on their
> test server and can't get the error. In their production
> system they are processing very large tables. Any ideas?