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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: PL/SQL problems

Re: PL/SQL problems

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Thu, 29 Nov 2001 03:44:07 -0800
Message-ID: <F001.003D02AE.20011129031535@fatcity.com>

Roland.Skoldblom_at_ica.se wrote:
>
> Hallo,
>
> I would like to know how to solve this problem:
>
> When this procedure runs, which makes an insert into table pbk.prisregister,
> it inserts the same value in field substitut where there exists a substitut.
>
> Please help me with this?
>
> It should be null in that field in case thre is a substiut for that ean number in
>the original table.
>

Roland,

  If I were you I would crap the whole procedure. Have you heard of something called 'JOIN'? Very interesting feature, which makes imbedded loops unnecessary (notwithstanding the fact that you are hard-coding all values. CURSOR_SHARING=FORCE, pleeeeeeze !). There is even something which is very very exciting, named 'external join', which could help in your case. I hardly dare mention UNIONs and the DECODE() function. Try of not thinking of relational tables as if they were sequential files.

-- 
Regards,

Stephane Faroult
Oriole Corporation
Voice:  +44  (0) 7050-696-269 
Fax:    +44  (0) 7050-696-449 
Performance Tools & Free Scripts
--------------------------------------------------------------
http://www.oriole.com, designed by Oracle DBAs for Oracle DBAs
--------------------------------------------------------------
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.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 Thu Nov 29 2001 - 05:44:07 CST

Original text of this message

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