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

Home -> Community -> Mailing Lists -> Oracle-L -> Have a good Thanksgiving--THANKSGIVING_LOAD.SQL

Have a good Thanksgiving--THANKSGIVING_LOAD.SQL

From: <tday6_at_csc.com>
Date: Wed, 21 Nov 2001 10:42:28 -0800
Message-ID: <F001.003CAF19.20011121100524@fatcity.com>

--THANKSGIVING_LOAD.SQL
--T. Day, SAI, 21-NOV-01
--Run on WORLD.UNIVERSE using schema with DEITY role
declare
cursor c_thanksgiving is
  select

        PERSON_ID /* NOT SSN -- generated by sequence generator (Jared) */

       ,RELATION
       ,CONDITION

  from YOUR.LIFE_at_WORLD where RELATION is not null;

V_CONDITION VARCHAR2 := NULL;
--

BEGIN
  For PERSON_ROW in C_thanksgiving LOOP

    V_CONDITION       := NULL;
      BEGIN
        IF PERSON_ROW.RELATION = 'FRIEND' THEN
           V_CONDITION := 'CONFIDENCE'
        ENDIF;
        IF PERSON_ROW.RELATION = 'ENEMY' THEN
           V_CONDITION := 'CONFUSION'
        ENDIF;
      UPDATE YOUR.LIFE_at_WORLD SET CONDITION = V_CONDITION WHERE
        PERSON_ID = PERSON_ROW.PERSON_ID;
      END;

COMMIT;
 END LOOP
END; Does that make it on topic?

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: tday6_at_csc.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Nov 21 2001 - 12:42:28 CST

Original text of this message

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