[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: SQR and Stored Procedure



Title: RE: SQR and Stored Procedure

Basically, the temporary table exists for the duration of the connection.  At the end of your BEGIN-SQL / END-SQL, the session ends.  What I have had to do is drop the # on the front of the table name, making it a "permanent" table (working on SQL Server), then at the end of my procedure just clean up by deleting the table.

Bob

-----Original Message-----
From: James Bowie [mailto:jpbowie@HOTMAIL.COM]
Sent: Monday, September 13, 1999 10:07 AM
To: Multiple recipients of list SQR-USERS
Subject: SQR and Stored Procedure


Does anyone have experience with creating a temporary table in a stored
procedure and referencing it from within SQR?

My Problem:

I have a stored procedure that performs several table updates and generates
2 temporary tables.  One table is for data that cannot be updated or added
because it contains errors, and the second is a table for new information
that has been added/updated to the permanent tables.  I need to reference
these temporary tables in an sqr program to generate two reports (obviously
an error report and a report containing data that has changed).  I have
created an SQR program that uses the EXECUTE statement with a -C option to
specify the connection.  I then use two BEGIN-SELECT statements with a -C
option to select the information from my temporary tables.  When I execute
the code, I get an error stating that the temporary tables do not exist.  I
have searched through the archives for this mailing list and have tried the
solutions suggested there, none seem to work.  Any suggestions?

My Environment:

AIX v4
SQR v4.0.1.1
SYBASE 11.5.1

Thanks,
James Bowie

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com