Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: PL/SQL again
Just doing a quick search on the code. I see you creating a bortags_flagg
variable. I see you writing SQL to select this value but I do not see the
variable being assigned.
This is in your declare statment.
borttags_flagg number;
Here you define lvSQL with a select statment. (I have edited out the
comments)
lvSQL := 'SELECT
ICA_ARTIKEL.FSGPRIS,ICA_ARTIKEL.BORTTAGS_FLAGG,ICA_ARTIKEL.PANTBELOPP ' ||
'FROM A'||AvdNr||'.ICA_ARTIKEL@'||LookUpServerName|| ' ' ||| 'WHERE ICA_ARTIKEL.EAN=' || EanLPVara || ' ' || 'AND ICA_ARTIKEL.DATUM<TO_DATE('''||inDatum||''',''YYYY-MM-DD'') ' || 'ORDER BY DATUM DESC'; DBMS_OUTPUT.PUT_LINE(lvSQL); OPEN c_t_PrisSubstitut FOR lvSQL; FETCH c_t_PrisSubstitut into tmpSubstitutPris,ButikPantBelopp;
The way I am reading this code you are selecting ICA_ARTIKEL.FSGPRIS into tmpSubstitutPris and ICA_ARTIKEL.BORTTAGS_FLAGG into ButikPantBelopp. I assume ButikPantBelopp, since based off REGISTER.pris, is a number and does not raise a data type problem when BORTTAGS_FLAGG is assigned to it. I can not be certain but changing the fetch to read...
FETCH c_t_PrisSubstitut into
tmpSubstitutPris,borttags_flagg,ButikPantBelopp;
may solve the problem. In any case I would review the code and select the BORTTAGS_FLAGG column in the appropriate cursor. The only other reference to the ICA_ARTIKEL table I could find followed ...
if varutyp <> 4 then
line of code. Perhaps this is the cursor that needs this column added.
Alec
-----Original Message-----
Roland.Skoldblom_at_ica.se
Sent: Thursday, April 04, 2002 8:04 AM
To: Multiple recipients of list ORACLE-L
I sent the wrong pl/sql code in last message. I want the field
BORTTAGS_FLAGG to be inserted in prisregister_kopia_wed.
(See attached file: regicarol.txt)
What is missing?
Thanks in advance
Roland S
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Alec Macdonell INET: amacdonell_at_usscript.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-LReceived on Thu Apr 04 2002 - 11:54:11 CST
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).