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

Home -> Community -> Mailing Lists -> Oracle-L -> OT!! Sybase supply value on-the-fly from input script

OT!! Sybase supply value on-the-fly from input script

From: Barbara Baker <barb.baker_at_gmail.com>
Date: Thu, 4 Oct 2007 09:40:25 -0600
Message-ID: <47a6f72b0710040840n6adadddcv468c23dcb2aaa716@mail.gmail.com>


Solaris 9 ASE server 12.5.0.3 :-)

Using sqlplus with Oracle, I can write a script like this

  select os_username, username, userhost, terminal,

        to_char(timestamp,'DD-Mon hh24:mi') timest ,
        returncode

  from sys.dba_audit_session
  where returncode != 0 and timestamp > sysdate-'&&1'

and either supply the value for &&1 on the command line

     $ sqlplus barb/sspwd @audits 5

or run the script and supply the value when the script runs

            $ sqlplus barb/sspwd @audits

            Connected to:
            Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

             Enter value for 1:   5


Does anyone know how to do the same thing in sybase?

I can supply the value from within a script:

  DA=$1

  $SYBASE/bin/isql -U${PPIUSER} -P${SYBPASSWD} -w244 << EOF1     select DA.Id, "DA.AdSysAdNo" = convert(char(10),DA.AdSystemAdNo),     from DisplayAd DA where DA.AdSystemAdNo='$DA'     go

  EOF1 But I cannot figure out a way to prompt interactively for the value "on-the-fly".

If anyone knows how to do this, I would love to know.

Thanks!

Barb

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Oct 04 2007 - 10:40:25 CDT

Original text of this message

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