Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sybase vs Oracle - which is better?
Any command equivalent to spool <filename> . When you want to use SQL to create SQL you need that. The only option I know of is to use -i and -o together.
Denny
In article <366ECC2D.D9E35B4_at_compuserve.com>,
"Mark A. Parsons" <iron_horse_at_compuserve.com> wrote:
>
>
> 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.
>
>
-- Denny Koovakattu -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your OwnReceived on Thu Dec 10 1998 - 00:00:00 CST