Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQR & Sybase

356 views
Skip to first unread message

Patrick Gannon

unread,
Apr 12, 1994, 8:53:28 AM4/12/94
to

Does anyone out there have experience using a report writer called SQR with Sybase?

I used to use it for some Oracle reporting, but I would like to know if SQR can handle calls to stored procedures. In trying it out, I was unable to use this syntax:

begin-procedure select-data
begin-select ! I guess this is probably why. it is an SP, not a true select
stored_procedure_call
end-select
end-procedure

Is a construct like this possible using SQR? Thanks for any info. Please reply to me via email at: gann...@jpmorgan.com. I will post a summary of any replies.

Patrick Gannon
J.P Morgan & Co.
gann...@jpmorgan.com


Satel Corporation

unread,
Apr 12, 1994, 8:44:26 PM4/12/94
to
Patrick Gannon (gann...@jpmorgan.com) wrote:
: [Stored procedures in SQL Solutions SQR?]

I have not written SQR for some time, but I recall that you could call a
stored procedure and pass parameters, but you were not able to receive
output from the stored procedure into SQR. (this is not a known fact)

Devan Green
Satel Corp


Kai Tham Sybase Support,CEDEV

unread,
Apr 14, 1994, 8:48:32 PM4/14/94
to


Use this instead.

begin-procedure select_data

begin-sql
exec stored_procedure_call
end-sql

end-procedure


---

Kai

*****************************************
* Kai Tham *
* 168 Group, Inc. *
* (212)886-1825 *
*****************************************


Brendan McKelvey

unread,
Apr 18, 1994, 2:58:36 PM4/18/94
to
There is an entire EXECUTE command available. This will allow you to
execute a stored procedure with parameters and even retrieve the first
set of results into SQR variables.

For the results from the first sql query, you can then "do" a paragraph
to process each row. Parameter can be input and/or output similar to
"isql" processing.

This is all documented in some release notes somewhere.

Good luck
JBrendan

BTW - You could also do something like:
begin-sql
exec procA $value1 #value2....
end-sql

But you lose some functionality for row by row processing of results.

--
=============================================================================

Brendan McKelvey (jbrendan) Mail : brendan....@sybase.com
Sybase Technical Support
77 South Bedford St. 5th Floor Phone: 1-800-8SYBASE
Burlington, MA 01803 1-800-879-2273

"Dont worry, be happy!!" "Happy, Happy, Joy, Joy!!"
=============================================================================

cwg...@news.delphi.com

unread,
Apr 22, 1994, 11:35:03 PM4/22/94
to
Speaking of SQR & SYBASE, when is Sybase going to fix the problem of
platform dependant runtimes? It is not currently possible to move a
compiled (sic) SQR program from the DOS/Windows environment to a UNIX
SQR-Execute environment. This means that you have to develop on the PC
and re-compile on the UNIX box. This also means that you have to by a
full SQR workbench license for the UNIX box ( in my case Sun Solaris).
Come on guys! This is just p-code. There is no reason (except for byte
ordering) why there should be any problem doing this. At least provide a
"re-compile" switch on the command line so that we do not get dingged for
the full workbench price on every platform in the shop!

David Van Couvering

unread,
Apr 28, 1994, 1:39:00 PM4/28/94
to
Patrick Gannon (gann...@jpmorgan.com) wrote:

| From LindaVan...@solectron.com Thu Apr 28 00:46 PDT 1994
| From: LindaVan...@solectron.com
| Date: 27 Apr 94 12:40
| To: dav...@sybase.com
| Subject: Re: (fwd) SQR & Sybase
| Content-Type: text
|
| There are two ways to execute a stored procedure in SQR with Sybase:
|
| 1) begin-sql
| execute myproc $var, #var2, ...
| end-sql
|
| This is for stored procedures that do not return data, only perform
| some action
|
| 2) EXECUTE [-Cn] [ON-ERROR=procedure [DO=procedure]
| [@#status_variable=] stored_procedure_name
| [[@param=] $|#|$var|value [OUT[PUT] [,...]
| [into &col_name data_type [(len)]] [,...]
| [WITH RECOMPILE]
|
| This is straight from the book... this is for stored procedures
| that return data - only the first set of results are
| processed (just like begin-select can only handle one
| select statement). The DO=procedure will do all the
| processing like printing, making nested procedure calls,
| calculations, etc.
|
|

0 new messages