[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Want to use Sybase non-sharable temporary # tables in SQR
- Subject: Re: Want to use Sybase non-sharable temporary # tables in SQR
- From: Rebecca Barilleaux <Rebecca.Barilleaux@ANTHEM.COM>
- Date: Mon, 25 Jun 2001 08:09:20 -0400
Vijay,
Yes, it is possible to use temp tables in SQR. But the table must be
defined at compile time in order for you to use it in your program, so you
need to define the table in the Begin-Setup section using Begin-SQL and a
CREATE TABLE statement. Then you can either change your select..into into
an insert statement, or you can drop the table before recreating it with
your select..into.
Rebecca
>Date: Fri, 22 Jun 2001 14:21:41 -0400
>From: "Pimple, Vijay C Mr USAREC" <Vijay.Pimple@USAREC.ARMY.MIL>
>Subject: Want to use Sybase non-sharable temporary # tables in SQR
>MIME-Version: 1.0
>Content-Type: text/plain; charset="iso-8859-1"
>
>Hi all,
>
>I am running SQR against sybase 11.9.2 database and I am testing whether I
>can use sybase non-sharable temporary # tables in Begin-sql section and
>select columns from the # tables in BEGIN-SELECT section.
>
>I created the following sqr report and I am getting compile error -
>
>Begin-Program
> Position (1,1)
> Do Master_Query
>End-Program
>
>Begin-Procedure Master_Query
>begin-sql
>select sname, etable into #vptest from dbo.adp_t
>go
>end-sql
>Begin-Select
>sname (+1,5,15)
>etable (,17,20)
>From #vptest
>End-Select
>End-Procedure
>
>Begin-Heading 4
> Print $current-date (1,1) edit 'MM/DD/YYYY'
> Page-Number (1,5)
> Print 'SNAME' (+1,1,5) Underline Bold
> Print 'ETABLE' (,17,8) Underline Bold
>End-Heading
>
>I can call stored procedure in begin-sql and within stored procedure I can
>create #tables but I cannot access the same table in Begin-select section.
>
>Is it possible to create #temporary tables in Begin-sql section and use in
>begin-select section ?
>
>
>Please advise me.
>
>Regards,
>
>Vijay
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.