Link to home
Start Free TrialLog in
Avatar of gtfly
gtfly

asked on

Sybase stored procedure: Problem when loading stored procedure containing a temp table.

We are attempting to load a stored procedure that references a temp table.  The problem is that Sybase is pre-compiling the stored procedure, and it is erroring because the temp table hasn't been created yet.  How can we load this stored procedure, while still being able to use temp tables in the stored procedure?
We are loading the stored procedure from the command line using isql -i[filename]...
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

what is the actual error message?

i'm more  familiar with SQL Server ... is this a global temporary table?


is it a real problem ?  is the message a warning rather than an error message?
Avatar of gtfly
gtfly

ASKER

It's not a global temp table.  It is an error message, as follows:

Msg 208, Level 16, State 1: Line 4: #temp1 not found.  Specify owner.objectname or user sp_help to check whether the object exists (sp_help may produce lots of output).

It's a valid error message, because the table really does not exist, so sp_help returns nothing.  The temp table is created in the stored procedure itself.

Any help would be appreciated.  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of grant300
grant300

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
Avatar of gtfly

ASKER

Excellent!!!!  It worked, thanks for your help!