Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

stored procedure as data source

2 posts in PB Infomaker Report Writer Last posting was on 1998-05-05 22:15:25.0Z
Ann Galbreath Posted on 1998-05-05 18:11:38.0Z
Newsgroups: sybase.public.infomaker.general
Date: Tue, 05 May 1998 14:11:38 -0400
From: Ann Galbreath <agalbrea@advancement.uvm.edu>
X-Mailer: Mozilla 4.04 [en] (WinNT; I)
MIME-Version: 1.0
Subject: stored procedure as data source
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 7
Message-ID: <348_354F5659.F89755C6@advancement.uvm.edu>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:7116
Article PK: 243145

I'm looking for example(s) using a stored procedure as a data source.
I'm having trouble visualizing what the "result set" can be. Does it
have to be a table? Can it be a cursor? Or just variables from a
SELECT INTO...?

Thanks,
Ann Galbreath


DawnBrownEyes[TeamPS] Posted on 1998-05-05 22:15:25.0Z
Newsgroups: sybase.public.infomaker.general
From: "DawnBrownEyes[TeamPS]" <browneyd@kochind.com>
Subject: Re: stored procedure as data source
Organization: TeamPS
X-Newsreader: Microsoft Internet News 4.70.1161
Date: Tue, 05 May 1998 18:15:25 -0400
Lines: 45
Message-ID: <348_01bd787b$d6bdb7b0$3d18d192@kii-201520>
References: <348_354F5659.F89755C6@advancement.uvm.edu>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:7114
Article PK: 243148

Yes to all.

You stored procedure can get info from several tables, a variable...It can
accept retrieval arguments....

I think there are some sample datawindows using sp in pb6.

Example: A stored procedure can:

Select 'Hello'
The datawindow will then have 1 column and 1 row.

Select id, desc from payroll_table
The datawindow will have 2 columns and many rows

use retrieval arguments:
Select id, desc from payroll_table where state = @state

If we have extensive processing we use temp tables (Sybase)
Select id into #temp1 from payroll
Select id into #temp2 from employee
Select t1.id from #temp1 t1, #temp2 t2 where t1.id = t2.id
The datawindow would then contain id column and many rows

I have never tried using a cursor and send rows back to PB
one at a time. What I usually do is populate a work table or temp table
#xxx
using a cursor and send the result set back to pb when I am finished.

A Stored procedure is a program that is saved on the Database Server.
The datawindow sends a command to tell the server to execute the stored
procedure.
All work tables, variables ... will be in the RAM of the Server. All the
work
is done on the server. They are usually created when there is multiple SQL

statements that need to be executed before the result set is brought back
to the client.


HTH

--
Dawn T Brown Eyes (TeamPS)

Ann Galbreath <agalbrea@advancement.uvm.edu> wrote in article
<354F5659.F89755C6@advancement.uvm.edu>...
> I'm looking for example(s) using a stored procedure as a data source.
> I'm having trouble visualizing what the "result set" can be. Does it
> have to be a table? Can it be a cursor? Or just variables from a
> SELECT INTO...?
>
> Thanks,
> Ann Galbreath
>
>