DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: SQLPlus question

  1. #1
    Join Date
    Aug 2003
    Posts
    100

    SQLPlus question

    I have the following sql script that I run

    UPDATE LOAD
    SET status = 'H'
    WHERE bill IN (
    SELECT bill
    FROM LOAD l, fp_invoice i
    WHERE l.status = 'X' AND i.inv_bol = l.bill
    AND i.status_code = 80);

    commit;

    UPDATE shipment
    SET status = 'H'
    WHERE ID IN (SELECT load_id
    FROM load_stop
    WHERE bol_id IN (SELECT load_id
    FROM fp_master
    WHERE status_code = 80 AND load_id LIKE '%S'));

    commit;
    /

    exit;


    Which generates this output:

    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production

    0 rows updated.
    Commit complete.
    Commit complete.
    Commit complete.

    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production

    My question is this: Where are the other two commits comming from as I only commit twice? How come the second query doesn't return the "0 rows updated" (I know there are no rows to update). How can I show the SQL that was executed in the output?

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Cool Re: SQLPlus question

    Originally posted by ssmith001
    My question is this: Where are the other two commits comming from as I only commit twice? How come the second query doesn't return the "0 rows updated" (I know there are no rows to update). How can I show the SQL that was executed in the output?
    The second commit comes from the '/' after the last commit:
    Code:
    commit;
    /
    To show sql use:
    Code:
    SET ECHO ON FEED ON
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    Aug 2003
    Posts
    100
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width