Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Sybase vs Oracle - which is better?

Re: Sybase vs Oracle - which is better?

From: Mark A. Parsons <iron_horse_at_compuserve.com>
Date: 1998/12/09
Message-ID: <366ECC2D.D9E35B4@compuserve.com>#1/1

denny_vk_at_my-dejanews.com wrote:

> In article <3658A4C7.EF178B08_at_worldnet.att.net>,
> jabuhl_at_worldnet.att.net wrote:
> >
> >
>
>
> You can use dbms_output to get the results back. You can write scripts which
> give you the info. you require and execute it with @filename.sql . Can you do
> something of this sort without connecting to isql everytime and passing the
> filename with the -i option. Also Sybase doesnot have anything equal to spool
> <filename> . A combination of these makes administration easier.
>

The problem with using dbms_output is that I now have to build a cursor loop and string format each time I want to pass back the results. With Sybase I can write a stored proc to return the contents of 'mytable' as follows:

create proc get_mytable_contencts
as

    select * from mytable
return

Heck of a lot easier than setting up a cursor and calling dbms_output for each row ... not to mention a hell of a lot more efficient than stepping through a cursor and making a package/procedure call for each row in my result set.

As for you comment about calling '@filename.sql' ... you need to have "filename.sql" available, in the filesystem, on each platform where you decide to fire up sql*plus ... it'd be nice if you could store that script in the database itself so that you don't have to copy your scripts to each OS platform where you might connect from. With Sybase I put the logic into a stored procedure, stored in the database ... thus allowing me to log in from any OS and still be able to get at my logic.

Note: In isql you can read in a script file (ala sql*plus's '@...') based on the appropriate editor command for reading in a file.

--
Mark A. Parsons
Iron Horse, Inc.
Received on Wed Dec 09 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US