[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ulysse::rdb_vms_competition

Title:DEC Rdb against the World
Moderator:HERON::GODFRIND
Created:Fri Jun 12 1987
Last Modified:Thu Feb 23 1995
Last Successful Update:Fri Jun 06 1997
Number of topics:1348
Total number of notes:5438

372.0. "ORACLE MACROS" by ZPOV01::JEFFREYCHOY (Who are U?...Counter-Revolutionary) Thu Jun 22 1989 07:13

Hi Network Friends,
    
    I have here a script or so called Oracle macros.
    Could somebody comment whether this is ANSI compliant.
    
    
    thanks
    
    
ROTH/ROTH
SET ECHO ON
SET TERMOUT ON
SET TIME ON
SET TIMING ON
SPOOL SQL5.ROT
UPDATE EMP  X
 SET DNAME = (SELECT DNAME FROM DEPT
  WHERE X.DEPTNO=DEPT.DEPTNO),
 ENAME = (SELECT ENAME FROM EMP1
 WHERE X.EMPNO=EMP1.EMPNO)
WHERE EXISTS
(SELECT * FROM EMP1,EMP
WHERE X.EMPNO=EMP1.EMPNO);
SPOOL OFF

T.RTitleUserPersonal
Name
DateLines
372.1Only 1 in 8 ... maybeMAIL::DUNCANGGerry Duncan @KCOMon Jun 26 1989 19:0931
    I looked these up in the SQL*plus Reference Manual.  
    
    ROTH/ROTH	is username/password.  Nice to have this revealved !!!
    
    Per the SQL*plus manual, all SET and SPOOL commands are SQL*plus
    commands.  Whether there exists equivalent functionality on the
    SQL standard, I do not know.  Specifically, here's what they do:
    
    SET ECHO ON  causes all commands (ANSI SQL or SQL*plus) to be displayed
    on the terminal 
    
    SET TERMOUT ON causes all lines to be displayed on the terminal
    once the query is complete or as it is executing
    
    SET TIME ON causes the date and time to be displayed prioir to the
    execution of each entry (so you can measure that good performance
    !!)
    
    SPOOL SQL5.ROT causes the result of the query to be written to a
    file named SQL5.ROT.
    
    Don't know about the update command.  Maybe the SQL folks can answer.
    
    I don't know what a marco means but I view this a just another
    command procedure.  You can probably do all the same things with
    Rdb, SQL, etc.  So, I guess that means that Rdb has macro too.!!!

    	--gerry