Error PLS-00402 in <; for IN (SELECT...)
I have a sp with slider and loop for IN (SELECT) it Dichter fine until I got to join in the SELECT statement for I get this now:PLS-00402: alias required in the SELECTION list of the cursor to avoid duplicate column names
I have triple checked my SELECT worked very well for the query window, are there special rules for < for (SELECT) IN >
It is in fact view if it's to colect contra information on given side transaction
FOR i IN (
select t1.IDCUST, t1.AMOUNT, t1.CELL,
t1.SHIPCUST, t1.PRODID,
t2.SHIPCUST, t2.PRODID,
from RYBA.VIEW_TANG t1
inner join RYBA.VIEW_TANG t2 on t2.IDCUST = t1.IDCUST
where t1.SIDE != t2.side
)
LOOP
....
This error indicates the line < for in >:PLS-00402: alias required in the SELECTION list of the cursor to avoid duplicate column names
I see that he doesn't like t1.shipcust and t2.shipcust at the same time, as it doen't recognize my prefixes t1, t2 is an easy solution but why it so?
without t2. columns that it compiles OK.
Appreciate your help on this simple someboy material.
TX
Trento
T1. SHIPCUST
T2. SHIPCUST
T1. PRODID,
T2. PRODID,
Alias of these columns...
Tags: Database
Similar Questions
-
Error PLS-00402 - duplicate column names
I get the following error message: PLS-00404: list of the cursor in order to avoid duplicate column requested Alias names on the following pl/SQL script
Can someone please help me solve this problem, because from what I see, it does seem as if I had duplicates
create or replace procedure CIS. UP_WATER_RATE_CHANGE_COMM is
number of n_account_number;
number of n_service_id;
number of n_servservacct_rate_cate_id;
number of n_service_service_acct_id;
vc_rate_category varchar2 (8);
vc_sewer_rate_category varchar2 (8);
vc_infrastr_rate_category varchar2 (8);
vc_water_meter_size varchar2 (10);
vc_new_rate_category varchar2 (8);
vc_new_sewer_rate_cat varchar2 (8);
Start
for my_rate_rec_comm in
(SELECT AC. ACCOUNT_NUMBER,
SPAM SERVICE_SERVICE_ACCT_ID,
SPAM SERVICE_ID,
FTM WATER_METER_SIZE,
SSARC. SERVSERVACCT_RATE_CAT_ID,
SSARC. SERVICE_SERVICE_ACCT_ID,
SSARC. RATE_CATEGORY,
SSARC. EFFECTIVE_DATE,
SSARC. SEWER_RATE_CATEGORY,
SSARC. INFRASTR_RATE_CATEGORY,
SSARC. END_DATE
OF HIS SERVICE_ACCOUNT,.
SERVICE_SERVICE_ACCOUNT SSA,
SERV_SERV_ACCT_RATE_CAT SSARC,
RATE_CATEGORY RC,
ACCT_CUSTOMER_MAIL_INSTR ACMI,
CUSTOMER_MAILING_ADDRESS CMA,
ACCOUNT_CUSTOMER AC,
SERVICE_ADDRESS SADD,
SERVICE S,
ELECTRONIC EQUIPMENT,
AND TYPE_EQUIPEMENT,
EQUIPMENT_CLASS EC
WHERE SA. SERVICE_ACCOUNT_NUMBER = SSA. SERVICE_ACCOUNT_NUMBER
AND SSARC. SERVICE_SERVICE_ACCT_ID = SSA. SERVICE_SERVICE_ACCT_ID
AND ACMI. ACCOUNT_CUSTOMER_ID = AC. ACCOUNT_CUSTOMER_ID
AND ACMI. MAILING_ADDR_ID = CMA. MAILING_ADDR_ID
AND AC. ACCOUNT_NUMBER = SA. ACCOUNT_NUMBER
AND RC. RATE_CATEGORY = SSARC. RATE_CATEGORY
AND SADD. SERVICE_ADDRESS_ID = SA. SERVICE_ADDRESS_ID
AND SSA. SERVICE_ID = S.SERVICE_ID
AND SA. LAST_SERVICE_END_DATE IS NULL
AND SSARC. END_DATE IS NULL
AND S.SERVICE_TYPE = 'WATER '.
AND THE ACM. END_DATE IS NULL
AND ACMI. END_DATE IS NULL
AND RC. RATE_CATEGORY IN ('2', '4', '11', '12', '13', ' 14 ', ' 15', 16', 17', 18', 60', 60 'A')
AND RC. RATE_CATEGORY NOT IN ('66', '81', '84' 86', 'CFLATWTR')
AND S.SERVICE_ID = E.CURRENT_SERVICE_ID
AND E.EQUIPMENT_TYPE_ID = AND. EQUIPMENT_TYPE_ID
AND HE. EQUIPMENT_CLASS = CBS. EQUIPMENT_CLASS
and ssarc.servservacct_rate_cat_id in (231234, 305193)
AND THIS. EQUIPMENT_CATEGORY = "WMETER")
loop
n_account_number: = my_rate_rec_comm.account_number;
n_service_id: = my_rate_rec_comm.service_id;
n_servservacct_rate_cat_id: = my_rate_rec_comm.servservacct_rate_cat_id;
n_service_service_acct_id: = my_rate_rec_comm.service_service_acct_id;
vc_rate_category: = my_rate_rec_comm.rate_category;
vc_sewer_rate_category: = my_rate_rec_comm.sewer_rate_category;
vc_infrastr_rate_category: = my_rate_rec_comm.infrastr_rate_category;
vc_water_meter_size: = my_rate_rec_comm.water_meter_size;
vc_new_rate_category: = ' ';
vc_new_sewer_rate_cat: = ' ';
If vc_rate_category = 60 'a' then
case vc_water_meter_size
When ' 5/8 ' then
vc_new_rate_category: = 'CWSWEX58 ';
When ' 3/4 ' then
vc_new_rate_category: = 'CWSWEX34 ';
When then '1'
vc_new_rate_category: = 'CWSWEX00 ';
When ' 1' 1/2 then
vc_new_rate_category: = 'CWSWEX01 ';
When "2" then
vc_new_rate_category: = 'CWSWEX02 ';
When '3' then
vc_new_rate_category: = 'CWSWEX03 ';
When '4' then
vc_new_rate_category: = 'CWSWEX04 ';
When '6' then
vc_new_rate_category: = 'CWSWEX06 ';
When '8' then
vc_new_rate_category: = 'CWSWEX08 ';
end case;
vc_new_sewer_rate_cat: = null;
on the other
case vc_water_meter_size
When ' 5/8 ' then
vc_new_rate_category: = 'COMWTR58 ';
vc_new_sewer_rate_cat: = 'COMSWR58 ';
When ' 3/4 ' then
vc_new_rate_category: = 'COMWTR34 ';
vc_new_sewer_rate_cat: = 'COMSWR34 ';
When then '1'
vc_new_rate_category: = 'COMWTR00 ';
vc_new_sewer_rate_cat: = 'COMSWR00 ';
When ' 1' 1/2 then
vc_new_rate_category: = 'COMWTR01 ';
vc_new_sewer_rate_cat: = 'COMSWR01 ';
When "2" then
vc_new_rate_category: = 'COMWTR02 ';
vc_new_sewer_rate_cat: = 'COMSWR02 ';
When '3' then
vc_new_rate_category: = 'COMWTR03 ';
vc_new_sewer_rate_cat: = 'COMSWR03 ';
When '4' then
vc_new_rate_category: = 'COMWTR04 ';
vc_new_sewer_rate_cat: = 'COMSWR04 ';
When '6' then
vc_new_rate_category: = 'COMWTR06 ';
vc_new_sewer_rate_cat: = 'COMSWR06 ';
When '8' then
vc_new_rate_category: = 'COMWTR08 ';
vc_new_sewer_rate_cat: = 'COMSWR08 ';
end case;
end if;
-Expiry date the old rate
UPDATE SERV_SERV_ACCT_RATE_CAT
END_DATE SET = TO_DATE ('2009-11-01 00:00:00 ',' ' YYYY/MM/DD HH24:MI:SS)
WHERE SERVSERVACCT_RATE_CAT_ID = n_servservacct_rate_cate_id;
-Insert the new rate
INSERT INTO SERV_SERV_ACCT_RATE_CAT
VALUES (SERV_SERV_ACCT_RATE_CAT_SEQ.nextval, n_service_service_acct_id, vc_new_rate_category, TO_DATE ('2009-11-01 00:00:00 ',' ' YYYY/MM/DD HH24:MI:SS), vc_new_sewer_rate_cat, vc_infrastr_rate_category, null);
end loop;
-commit;
Exception
while others then
dbms_output.put_line (' failed to update on account of Service of Service ID: ' | n_servservacct_rate_cate_id);
Rollback;
end UP_WATER_RATE_CHANGE_COMM;Hello
the next column is selected twice SERVICE_SERVICE_ACCT_ID, you need an alias for one of them.
Thank you
-
PLS-00402 Alias required for selection of the slider list to avoid the names of col dup
Hi Frens,
I met the above error and fail to solve. Can someone help me please? I can't draw.
PROCEDURE FTEST_ST_YLD_PROC
(
pScheduleoption IN varchar2,
pCustomercode IN varchar2,
pActivity IN varchar2,
Adapting IN varchar2,
pWW varchar2,
pPackage IN varchar2,
pCursor in THE CRPT_CURTYPE. T_RPTCUR)
IS
vStartDate varchar2 (15) value default null;
vEndDate varchar2 (15) value default null;
vWW default number 0;
vCustomercode VarChar2 (5);
vPackage VarChar2 (30);
vActivity Varchar2 (40);
vStep Varchar2 (40);
jar varchar2 (20);
XYZ cursor IS
SELECT leadcount package unit, testdevice, customercode, originalcustomerlotnumber, customerlotnumber, trackinqty, batch, bintype, binphysicalqty, testpasssamplenumber,
Description, ww, BinType, binnumber, binlotid, t.Activity, t.Step, month, LastUpdate, UNACCOUNTVARIANCE, binlotid, yieldvalue
OF ftest_testtxn@shdb t, fwcatns_testbintxn@shdb b
where t.lotobject = b.lotobject
and t.step = b.step
and t.operationtype = b.operationtype
and t.lottxncounter = b.lottxncounter
and t.activity = vActivity
and t.customercode = vCustomerCode
and t.step = vStep
and t.package = vPackage
and ((t.lastupdate > vStartDate et t.lastupdate < = vEndDate) or t.ww = vWW);
BEGIN
-CustomerCode
If pCustomercode = ' *' OR pCustomercode Is Null Then
vCustomerCode: = '% ';
On the other
vCustomerCode: = pCustomercode;
End If;
-Package
If ppackage = ' *' GOLD ppackage Is Null Then
vPackage: = '% ';
On the other
vPackage: = ppackage;
End If;
Their properties-
If pActivity = '%' OR pActivity Is Null Then
vActivity: = '% ';
On the other
vActivity: = pActivity;
End If;
-Step
If adapting = ' *' OR adapting Is Null Then
vStep: = '% ';
On the other
vStep: = adapting;
End If;
-Date range
If pScheduleoption = "Monthly" then
vStartDate: = utl_cal.firstdayofperiod (to_char (SYSDATE, 'YYYYMMDD'));
vEndDate: = utl_cal.lastdayofperiod (to_char (SYSDATE, 'YYYYMMDD'));
elsif pScheduleoption = "Weekly" then
VEM: = utl_cal.workweek (to_char (SYSDATE, 'YYYYMMDD'));
vStartDate: = firstdayofww (vWW, utl_cal.firstdayofperiod (to_char (SYSDATE, 'YYYYMMDD')));
vEndDate: = lastdayofww (vStartDate);
elsif pScheduleoption = 'Manual' then
VEM: = pWW;
End If;
For Rec loop XYZ
Select to_char (d.originalcustomerlotnumber) separate in jar
fwcatns_diesinventory d, ftest_testtxn t
where d.lotobject = t.lotobject
and d.customerlotnumber = Lotcur.customerlotnumber;
If the BDU is null then
jar: = Lotcur.originalcustomerlotnumber;
ElsIf length (trim (wfr)) < = 100 then
jar: = wfr | «, » || Lotcur.originalcustomerlotnumber;
On the other
Exit;
End If;
End loop;
OPEN FOR PCURSOR
SELECT * FROM ftest_testtxn t, fwcatns_testbintxn b
where t.lotobject = b.lotobject
and t.step = b.step
and t.operationtype = b.operationtype
and t.lottxncounter = b.lottxncounter;
End;Hello
Whenever you perform the operation of join between two tables, the similar names of the columns in the junction tables must be identified under the pseudonym given to their respective tables. This helps to db to retrieve data in the required columns.
Thus,.
Replace the column name in the selection with an alias list duplicate.Kind regards
Twinkle -
Why I got error PLS-00103 for this procedure?
Hey, guys:
I have a question about the syntax of the exception, I want to record the number of rows from the tables, but if there is no such thing as a table, my program must be able to continue the loop.
I'm your only syntax error:create or replace procedure check_rows as cursor t1 is select table_name from all_csv where table_built='Y' and table_name is not null; match_count1 INTEGER; begin for n in t1 loop dbms_output.put_line(n.table_name); EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || n.table_name INTO match_count1 ; update all_csv set total_rows=match_count1 where table_name=n.table_name; exception when table_does_not_exist then null end; end loop; commit; end;
PLS-00103: encountered the symbol "EXCEPTION" when expected
of the following:
begin case declare end exit for goto if loop mod null pragma
raise return select update while < ID >
< between double quote delimited identifiers of > < a variable binding > < <
Close current delete fetch locking insert open rollback
SAVEPOINT SQLExecute set pipe fusion commit forall
Could someone give me a hint?
Thank you very much!
SamEXCEPTION clause should be at the end of the BEGIN block. It cannot start in the middle of the lock begin body:
create or replace procedure check_rows as cursor t1 is select table_name from all_csv where table_built='Y' and table_name is not null; match_count1 INTEGER; begin for n in t1 loop begin dbms_output.put_line(n.table_name); EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || n.table_name INTO match_count1; update all_csv set total_rows = match_count1 where table_name = n.table_name; exception when table_does_not_exist then null; end; end loop; commit; end; /
And it is not a good idea to engage in the stored procedure. But the main question here is table_does_not_exist exception because it is not declared in your code. You must declare it and use PRAGMA EXCEPTION_INIT to connect with the desired error code.
SY.
-
Stored error for a SELECT COUNT... in proc
DB version: 10 gr 2
I was getting error when compiling for a stored procedure for the
under IF condition
I don't get this error in DB2. It seems that in Oracle, I need put the result of this COUNT in a variable and use it in the IF condition. Is there an alternative? Why Oracle can't handle such a SELECTION within the AOC?if (select count(1) from ship_trk_dtl where order_id = p_orderid and order_status =110) > 0 then ...
the error was
Published by: kraljic on March 4, 2009 04:05LINE/COL -------------------------------------------------------------------------------- ERROR -------------------------------------------------------------------------------- 128/9 PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null others <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string> pipe LINE/COL -------------------------------------------------------------------------------- ERROR -------------------------------------------------------------------------------- <an alternatively-quoted string literal with character set specification> <an alternativ 129/35 PLS-00103: Encountered the symbol ")" when expecting one of the following: * & - + ; / at for mod remainder rem <an exponent (**)> and or group having intersect minus order start union where connect || multiset
Hello
Born to be used IN the clause to store the code SQL train in a variable. You can use the varuiable with IF.
SQL> DECLARE 2 a NUMBER(2); 3 BEGIN 4 SELECT COUNT(*) INTO a FROM DUAL; 5 DBMS_OUTPUT.PUT_LINE(a); 6 END; 7 / PL/SQL procedure successfully completed. SQL> set serveroutput on SQL> / 1 PL/SQL procedure successfully completed. SQL>
See you soon,.
-
Convert number to Varchar for printing the Type of table in a loop error: PLS-00306:
Hello
I am trying to print a number of the Table that I get from a ref cursor But cannot convert the number to Varchar to print. What I'm doing wrong here
Thank you
Ken
OUT_REFCURSOR FETCH BULK COLLECT INTO theTBL_RCRD_ID ;
So THAT (theTBL_RCRD_ID IS NOT NULL)
LOOP
strRCRDID: = TO_CHAR (onTBL_RCRD_ID (indx), "99999"); -This line throws error message
dbms_output.put_line (strRCRDID);
INDX: = indx + 1;
END LOOP;
- Error: PLS-00306: wrong number or types of arguments in the call to "TO_CHAR.
Try this...
strRCRDID: = TO_CHAR (outTBL_RCRD_ID (indx). RCRD_ID, "99999");
-
Any deployment of an existing map of OWB, particularly in an environment (example B), I am facing this error message so that the same code works fine in another environment (say A).
I tried importing the .mdl to another (A) environment where it works fine, imported in a B environment and attempted to deploy, has always given me same error message all in deployment.
Help, please.
Errors of compilation for BODY of PACKAGE *.
Error: PLS-00801: internal error [phdcsql_print_kge_errors::parm pos]
Line: 1
Text: CREATE OR REPLACE PACKAGE BODY "*" AS
Error: PL/SQL: statement ignored
Line: 11
Text: SELECT
Error: PLS-00801: internal error [phdcsql_print_kge_errors::parm pos]
Line: 1
Text: CREATE OR REPLACE PACKAGE BODY 'MAP_DMT_CUST_COMPLAINT_UI' AS
Error: PL/SQL: statement ignored
Line: 709
Text: SELECT
Error: PLS-00801: internal error [phdcsql_print_kge_errors::parm pos]
Line: 1
Text: CREATE OR REPLACE PACKAGE BODY "*" AS
Error: PL/SQL: statement ignored
Line: 2332
Text: MERGE
Error: ORA-00900: invalid SQL statement
ORA-00900: invalid SQL statement
ORA-00900: invalid SQL statement
Line: 1
Text: CREATE OR REPLACE PACKAGE BODY "*" AS
A table was missed and not imported in the OWB repository from which this table was not related. I imported this table, bounded to the search with the table operator and it worked fine.
Somehow instead of give the real reason, she gave this vague error.
I hope that this solution works for others :-)
-
I am receving oracle error PLS-00201
Hi all
When I call a procedure stored beside another stored procedure I get the below error
PLS-00201: identifier 'P_IN_USER_NAME' must be declared.
CREATE OR REPLACE PACKAGE BODY VABOSS. VABOSS_ODM_CHNG_PKG
AS
PROCEDURE VABOSS_DEL_UPL_CHNG (P_IN_UPD_NO IN VARCHAR2, P_IN_RELEASE IN P_IN_RECREATE IN P_IN_USER IN VARCHAR2, BOOLEAN, BOOLEAN)
IS
/*******************************************************************************************************************
Module name: VABOSS data, delete and insert
Package Name: VABOSS_ODM_CHNG_PKG
Program name: VABOSS_DEL_UPL_CHNG
Program description: this processing of drop table VABOSS_PLAN_ODM_BOM and insertion of data in the VABOSS_PLAN_ODM_BOM.
Created by: Maria - touati
Creation date: 14 October 2011
PROJECT_NAME: VABOSS
First version: 1.0
Input parameters: all THE
Output parameters: no
Return the parameters: no
********************************************************************************************************************/
CURSOR C_DEL
IS
SELECT GENERATION_ID, ODM_BOM_ID
OF VABOSS_PLAN_ODM_BOM
WHERE GENERATION_ID IN (SELECT GENERATION_ID
OF VABOSS_PLAN_ODM_UPDATE_ADMIN
WHERE UPD_NO = P_IN_UPD_NO);
CURSOR C_INST
IS
SELECT *.
OF VABOSS_INTR_ODM_BOM
WHERE ODM_BOM_ID IN SELECT (SEPARATE ODM_BOM_ID
Of
ADELINE VABOSS_PLAN_ODM_UPDATE_ADMIN
WHERE PUAH. UPD_NO = P_IN_UPD_NO;)
CURSOR C_UPD
IS
SELECT *.
OF VABOSS_PLAN_ODM_BOM_FILE
WHERE ODM_BOM_ID IN SELECT (SEPARATE ODM_BOM_ID
Of
ADELINE VABOSS_PLAN_ODM_UPDATE_ADMIN
WHERE PUAH. UPD_NO = P_IN_UPD_NO;)
V_UPD_NO VARCHAR2 (15);
V_ERROR_MSG VARCHAR2 (20);
NUMBER OF V_INS_CNT;
BEGIN
FOR T_UPD_NO IN C_DEL
LOOP
BEGIN
REMOVE FROM VABOSS_PLAN_ODM_BOM
WHERE GENERATION_ID = T_UPD_NO. GENERATION_ID;
UPDATE VABOSS_PLAN_ODM_BOM_FILE
SET CURRENT_STATUS = '99'
WHERE ODM_BOM_ID = T_UPD_NO. ODM_BOM_ID;
COMMIT;
EXCEPTION
WHILE OTHERS
THEN
VABOSS_COMMON_PKG.oracle_error_info (SQLCODE,
SQLERRM,
' VABOSS_ODM_CHNG_PKG. VABOSS_DEL_UPL_CHNG',.
p_in_user);
END;
END LOOP;
FOR T_INST_NO IN C_INST
LOOP
BEGIN
INSERT INTO VABOSS_PLAN_ODM_BOM (GRT_SEQ_NO,
ODM_BOM_ID,
SEQ_NO,
STATUS,
AGENDA,
BLOCK_ID,
BLOCK_NAME,
SPEC_CATEGORY_ID,
SPEC_CATEGORY_NAME,
SPEC_ID,
SPEC_NAME,
LEVEL_01,
LEVEL_02,
LEVEL_03,
LEVEL_04,
LEVEL_05,
LEVEL_06,
LEVEL_07,
LEVEL_08,
LEVEL_09,
MODULE_ID,
MODULE_NAME,
SONY_ASSY_NUMBER,
LOCAL_PARTS_NUMBER,
LOCAL_PARTS_NAME,
SONY_MP_PARTS_NUMBER,
SONY_SERVICE_PARTS_NUMBER,
SONY_SERVICE_PARTS_NAME,
PARTS_QUANTITY,
SERVICE,
SUBSTITUTE,
SERVICE_MANUAL_REF,
CRP,
SAFETY_PART,
ELECTRONIC_KEY_PART,
PROVISION,
ACL_TYPE,
$VENDOR_NAME,
VENDOR_DESCRIPTION,
GENERATION_ID,
PROTOTYPE_MODEL_NUMBER,
REMARKS1,
REMARKS2,
SERVICE_MANUAL_REMARK1,
SERVICE_MANUAL_REMARK2,
EFFECTIVE_START_DATE,
EFFECTIVE_END_DATE,
TECHNICAL_NEWS,
CREATE_USER,
CREATE_DATE,
MODULE_A_NO,
COMBINATION_PARTS,
EXPLOSION_CODE_FOR_SERVICE,
SERVICE_MANUAL_BLOCK,
SUBSTITUTE_PART_INFO,
USER_ADD_FLAG
)
VALUES (VB_PLAN_ODM_BOM_SEQ. NEXTVAL,
T_INST_NO. ODM_BOM_ID,
T_INST_NO. SEQ_NO,
'00',
T_INST_NO. AGENDA,
T_INST_NO. BLOCK_ID,
T_INST_NO. BLOCK_NAME,
T_INST_NO. SPEC_CATEGORY_ID,
T_INST_NO. SPEC_CATEGORY_NAME,
T_INST_NO. SPEC_ID,
T_INST_NO. SPEC_NAME,
T_INST_NO. LEVEL_01,
T_INST_NO. LEVEL_02,
T_INST_NO. LEVEL_03,
T_INST_NO. LEVEL_04,
T_INST_NO. LEVEL_05,
T_INST_NO. LEVEL_06,
T_INST_NO. LEVEL_07,
T_INST_NO. LEVEL_08,
T_INST_NO. LEVEL_09,
T_INST_NO. MODULE_ID,
T_INST_NO. MODULE_NAME,
T_INST_NO. SONY_ASSY_NUMBER,
T_INST_NO. LOCAL_PARTS_NUMBER,
T_INST_NO. LOCAL_PARTS_NAME,
T_INST_NO. SONY_MP_PARTS_NUMBER,
T_INST_NO. SONY_SERVICE_PARTS_NUMBER,
T_INST_NO. SONY_SERVICE_PARTS_NAME,
T_INST_NO. PARTS_QUANTITY,
T_INST_NO. SERVICE,
T_INST_NO. SUBSTITUTE,
T_INST_NO. SERVICE_MANUAL_REF,
T_INST_NO. CRP,
T_INST_NO. SAFETY_PART,
T_INST_NO. ELECTRONIC_KEY_PART,
T_INST_NO. PROVISION,
T_INST_NO. ACL_TYPE,
T_INST_NO. $VENDOR_NAME,
T_INST_NO. VENDOR_DESCRIPTION,
T_INST_NO. GENERATION_ID,
T_INST_NO. PROTOTYPE_MODEL_NUMBER,
T_INST_NO. REMARKS1,
T_INST_NO. REMARKS2,
T_INST_NO. SERVICE_MANUAL_REMARK1,
T_INST_NO. SERVICE_MANUAL_REMARK2,
T_INST_NO. EFFECTIVE_START_DATE,
T_INST_NO. EFFECTIVE_END_DATE,
NULL,
p_in_user,
VABOSS_COMMON_PKG. TIMEZONE_CONVERSION_TO_JST,
T_INST_NO. MODULE_A_NO,
T_INST_NO.COMBINATION_PARTS,
T_INST_NO. EXPLOSION_CODE_FOR_SERVICE,
T_INST_NO. SERVICE_MANUAL_BLOCK,
T_INST_NO. SUBSTITUTE_PART_INFO,
T_INST_NO. USER_ADD_FLAG
);
v_ins_cnt: = v_ins_cnt + sql % ROWCOUNT;
IF MOD (v_ins_cnt, 500) = 0
THEN
COMMIT;
END IF;
EXCEPTION
WHILE OTHERS
THEN
VABOSS_COMMON_PKG.oracle_error_info (SQLCODE,
SQLERRM,
' VABOSS_ODM_CHNG_PKG. VABOSS_DEL_UPL_CHNG',.
p_in_user);
END;
END LOOP;
FOR T_UPD_FILE IN C_UPD
LOOP
BEGIN
UPDATE VABOSS_PLAN_ODM_BOM_FILE
SET CURRENT_STATUS = '90',
UPDATE_USER = P_IN_USER,
UPDATE_DATE = VABOSS_COMMON_PKG. TIMEZONE_CONVERSION_TO_JST
WHERE ODM_BOM_ID = T_UPD_FILE. ODM_BOM_ID;
EXCEPTION
WHILE OTHERS
THEN
VABOSS_COMMON_PKG.oracle_error_info (SQLCODE,
SQLERRM,
' VABOSS_ODM_CHNG_PKG. VABOSS_DEL_UPL_CHNG',.
p_in_user);
END;
END LOOP;
-VALIDATION;
-IMMEDIATE EXECUTION "VABOSS_INTR_ODM_BOM";
FOR T_DEL_INTR IN C_DEL
LOOP
BEGIN
DELETE
OF VABOSS_INTR_ODM_BOM
WHERE ODM_BOM_ID = T_DEL_INTR. ODM_BOM_ID;
UPDATE VABOSS_PLAN_ODM_BOM
SET STATUS = '99',
UPDATE_USER = P_IN_USER,
UPDATE_DATE = VABOSS_COMMON_PKG. TIMEZONE_CONVERSION_TO_JST
WHERE ODM_BOM_ID = T_DEL_INTR. ODM_BOM_ID;
COMMIT;
EXCEPTION
WHILE OTHERS
THEN
VABOSS_COMMON_PKG.oracle_error_info (SQLCODE,
SQLERRM,
' VABOSS_ODM_CHNG_PKG. VABOSS_DEL_UPL_CHNG',.
p_in_user);
END;
END LOOP;
/ * Calls a procedure SERVICE_PARTS_LIST_RELEASE_ODM * /.
VABOSS_SERVICE_BOM_PKG. SERVICE_PARTS_LIST_RELEASE_ODM-> >HERE I am GETTING the ERROR
(P_IN_UPD_NO,
P_IN_USER_NAME);
EXCEPTION
WHILE OTHERS
THEN
VABOSS_COMMON_PKG.oracle_error_info (SQLCODE,
SQLERRM,
' VABOSS_ODM_CHNG_PKG. VABOSS_DEL_UPL_CHNG',.
p_in_user);
END VABOSS_DEL_UPL_CHNG;
END VABOSS_ODM_CHNG_PKG;
/
your help is apprecited
Thank you
Krupa879534 wrote:
PLS-00201: identifier 'P_IN_USER_NAME' must be declared.CREATE OR REPLACE PACKAGE BODY VABOSS. VABOSS_ODM_CHNG_PKG
AS
PROCEDURE VABOSS_DEL_UPL_CHNG (P_IN_UPD_NO IN VARCHAR2, IN BOOLEAN P_IN_RECREATE, IN BOOLEAN P_IN_RELEASE, * P_IN_USER * IN VARCHAR2)... snip...
VABOSS_SERVICE_BOM_PKG. SERVICE_PARTS_LIST_RELEASE_ODM---> >HERE I am GETTING the ERROR
(P_IN_UPD_NO,
( P_IN_USER_NAME ) ;Spot the difference
-
Error PLS-00103 and the program has stopped responding
Hey all, I am currently practical with pl/sql, I am a beginner trying to pl/sql self-training, I use the HR schema that accompanies the express edition of oracle 10g for practice, here is my code:
-- -------------------------------------------------------------------------------------------
FUNCTION to CREATE or REPLACE checkIfSalaryExceedMin (currentJobID in NUMBER, currentProposedSalary number)
RETURN BOOLEAN IS
minSalary NUMBER: = 0;
Begin
Select j.min_salary FROM minSalary of JOB j where j.job_id = currentJobID;
RETURN currentProposedSalary > minSalary;
End checkIfSalaryExceedMin;
-- -------------------------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
FUNCTION to CREATE or REPLACE checkForJobChange (currentEmpID in NUMBER, currentEmpStartDate IN DATE)
RETURN BOOLEAN IS
CURSOR emp_date_id_list1 IS (Select j1.start_date, e1.employee_id JOB_HISTORY j1 EMPLOYEES JOIN e1 ON j1.employee_id = e1.employee_id);
checkVal NUMBER: = 0;
Begin
For em1 IN LOOP emp_date_id_list1
IF (currentEmpID = em1.employee_id AND currentEmpStartDate! = em1.start_date) THEN
checkVal: = 1;
END IF;
END LOOP;
IF checkVal = 1 THEN
RETURN TRUE;
ELSIF checkVal = 0 THEN
RETURN FALSE;
END IF;
End checkForJobChange;
-- -------------------------------------------------------------------------------------------
-- ===================MAIN====================
Declare
CURSOR emp_date_id_list IS (Select j.start_date, e.employee_id, e.job_id, e.salary JOB_HISTORY e j EMPLOYEES JOIN ON j.employee_id = e.employee_id);
Begin
For em IN emp_date_id_list LOOP
IF (em.start_date < TO_DATE ('1990-01-01', 'YYYY-MM-DD')) THEN
IF (checkForJobChange (em.employee_id, em.start_date)) THEN
IF checkIfSalaryExceedMin (em.job_id, (e.salary + (e.salary*.20))) THEN
DBMS_OUTPUT. Put_line ('you can increase his salary');
END IF;
END IF;
END IF;
END LOOP;
End;
-- ================END==MAIN==================
What it does is check if the employee worked prior to January 1, 1990, if he had had a change of job and if it fulfills the two conditions, the program checks if its proposed new salary will be larger than his salary manager current, if not he can get a pay raise.
So my problem is I got an error PLS-00103 earlier, after some tweaking my program now is insensitive, what am I doing wrong? :(
Help, please. Thank you.checkIfSalaryExceedMin (currentJobID in NUMBER
Must be:
checkIfSalaryExceedMin (currentJobID in VARCHAR2
or:
checkIfSalaryExceedMin (currentJobID IN employees.job_id%type
Since then job_id is of data type VARCHAR2 and not a NUMBER.
Also
IF checkIfSalaryExceedMin (em.job_id, (e.salary + (e.salary*.20))) THEN
must be:
IF checkIfSalaryExceedMin (em.job_id, (em.salary + (em.salary*.20))) THEN
After some tweaking my program does not
I've been juggling as well and are unaware of any 'unresponsiveness':
SQL> declare 2 cursor emp_date_id_list 3 is 4 select j.start_date 5 , e.employee_id 6 , e.job_id 7 , e.salary 8 from job_history j 9 join employees e 10 on j.employee_id = e.employee_id; 11 begin 12 for em in emp_date_id_list 13 loop 14 if (em.start_date < to_date('1990-01-01', 'YYYY-MM-DD')) 15 then 16 if (checkforjobchange(em.employee_id, em.start_date)) 17 then 18 if checkifsalaryexceedmin(em.job_id, (e.salary + (e.salary * .20))) 19 then 20 dbms_output.put_line('You can raise his salary'); 21 end if; 22 end if; 23 end if; 24 end loop; 25 end; 26 / if checkifsalaryexceedmin(em.job_id, (e.salary + (e.salary * .20))) * ERROR at line 18: ORA-06550: line 18, column 47: PLS-00201: identifier 'E.SALARY' must be declared ORA-06550: line 18, column 9: PL/SQL: Statement ignored SQL> declare 2 cursor emp_date_id_list 3 is 4 select j.start_date 5 , e.employee_id 6 , e.job_id 7 , e.salary 8 from job_history j 9 join employees e 10 on j.employee_id = e.employee_id; 11 begin 12 for em in emp_date_id_list 13 loop 14 if (em.start_date < to_date('1990-01-01', 'YYYY-MM-DD')) 15 then 16 if (checkforjobchange(em.employee_id, em.start_date)) 17 then 18 if checkifsalaryexceedmin(em.job_id, (em.salary + (em.salary * .20))) 19 then 20 dbms_output.put_line('You can raise his salary'); 21 end if; 22 end if; 23 end if; 24 end loop; 25 end; 26 / declare * ERROR at line 1: ORA-06502: PL/SQL: numeric or value error: character to number conversion error ORA-06512: at line 18 SQL> create or replace function checkifsalaryexceedmin(currentjobid in employees.job_id%typ e 2 ,currentproposedsalary in number) 3 return boolean is 4 5 minsalary number := 0; 6 7 begin 8 9 select j.min_salary 10 into minsalary 11 from jobs j 12 where j.job_id = currentjobid; 13 14 return currentproposedsalary > minsalary; 15 16 end checkifsalaryexceedmin; 17 / Function created. SQL> declare 2 cursor emp_date_id_list 3 is 4 select j.start_date 5 , e.employee_id 6 , e.job_id 7 , e.salary 8 from job_history j 9 join employees e 10 on j.employee_id = e.employee_id; 11 begin 12 for em in emp_date_id_list 13 loop 14 if (em.start_date < to_date('1990-01-01', 'YYYY-MM-DD')) 15 then 16 if (checkforjobchange(em.employee_id, em.start_date)) 17 then 18 if checkifsalaryexceedmin(em.job_id, (em.salary + (em.salary * .20))) 19 then 20 dbms_output.put_line('You can raise his salary'); 21 end if; 22 end if; 23 end if; 24 end loop; 25 end; 26 / You can raise his salary You can raise his salary PL/SQL procedure successfully completed.
-
package with error pls-00103.
Hello all;
I was wondering if you can help me understand why I get an error pls-003. Also, how you include a blank space in a where in the statement. Thanks for the help
See the package belowSomething similar to this where in (' ')
See the below package bodycreate or replace package NEW_INFORMATION is function total_number return number; procedure daily_tasks; end NEW_INFORMATION;
create or replace package body NEW_INFORMATION is ----------------------------------------------------------------------------------------------------- function total_number return number is oput number(10); begin select count(unique (p1.user_id)) into oput from table_one p1 where p1.user_id in ('JOHN', 'PAIR', ' '); return oput; end; ----------------------------------------------------------------------------------------------------- procedure daily_tasks is name_p_id varchar2(20); temp_num number(6,2); temp_num := total_number(); --used to call the above function begin end daily_tasks ; end NEW_INFORMATION;
Hello
Whenever you have a question about an error message, it helps if you post the full error message, including line numbers.
In the package body, you must:
procedure daily_tasks is name_p_id varchar2(20); temp_num number(6,2); temp_num := total_number(); --used to call the above function begin ...
The statement
temp_num := total_number(); --used to call the above function
would be good after the BEGIN statement, but not in front of him, in the declaration section.
If you declare and initialize temp_num at the same time, you can say:temp_num number (6,2) := total_number;
Given that you call total_number without argument, the parnetheses are optional.
The condition
where p1.user_id in ('JOHN', 'PAIR', ' ');
is syntactically correct. It will result in the rows being counted when user_id is one of the following:
(a) the 4 characters strring 'J', 'o', 'H', ' don't
(b) the 4 characters strring 'P', 'A', 'I', 'R', or
(c) the 6-character string '',' ', ' ', ' ', '',' ' (in other words, 6characters) If this isn't what you want, post a small example of data for table_one (CREATE TABLE and INSERT statements) and the results desired from these sample data.
-
Error PLS-00306 with stored procedure
I am trying to create a simple package and store the procedure to remove the date of treatment for Crystal Reports can read all data. I used an example on the web site for Crystal report as reference in SAP: link: [http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1084c536-711e-2b10-e48a-924a60745253;jsessionid= (J2EE3417200) ID0966300750DB00193623365600119940End]
I ran the following and receive PLS-00306: wrong number or type of argument on the stored procedure. I am also pulling data with a databaselink to another data base given that our third-party vendor will not connect directly to the main database.
I am new to PL/SQL, so I don't know what else to solve problems. Thank you for taking the time to review this.
-1. Create a temporary table
CREATE TEMPORARY TABLE global test_temp
(processdate DATE NOT NULL);
-2.Create package w / require REF CURSOR for Crystal reports
CREATE or REPLACE PACKAGE test_package
IN the TYPE processdate_TYPE IS REF CURSOR
RETURN test_temp % ROWTYPE;
END test_package;
/
-3. Stored procedure
CREATE OR REPLACE PROCEDURE test_Procedure
(processdate_cursor IN OUT test_Package.processdate_TYPE,
processdate_parameter IN test_temp.processdate%TYPE)
AS
processdate DATE;
BEGIN
OPEN FOR Processdate_cursor
SELECT processdate
OF processlog@WEATEST
WHERE processname = "F_ExecuteScheduleProcess" and processtype = ';
END test_Procedure;
/You say that you do not understand where there is a wrong number or type?
This error occurs because there is an incorrect number of parameters passed. Your procedure
Test_SP expects 3 parameters as defined by you as follows
(p_ID in number,
p_firstname OUT varchar2,
p_lastname OUT varchar2)But when you run, you're not not p_id, has not managed to p_firstname, has failed to p_lastname. So there are number of parameters and that's what suggests the error.
To run your test_sp
Declare
sFirstName Test_Table.FirstName%Type;
sLastName Test_Table.Lastname%Type;
Nest Test_Table.ID%Type: = 1;
Begin
Test_SP(1,sFirstName,sLastName);
End;I hope this helps.
-
has encountered an error "PLS-00103: encountered the symbol"CREATE"when expec".
Hi all
I am creating a procedure and try to use the temporary table...
Here is the code:
--------------------------------------------------------------------------------------------------------------------------------------------
PROCEDURE P_PARENT_TREE
(
topic_id_in in NUMBERS
topic_hierarchy_details_out ON SYS_REFCURSOR
) IS
temp_children_level topic_children.children_level%TYPE;
temp_children_id topic_children.children_id%TYPE;
temp_topic_id topic.topic_id%TYPE;
CURSOR c_child_level IS
SELECT children_level, children_id
OF topic_children
WHERE children_id = topic_id_in;
BEGIN
OPEN c_child_level.
EXTRACT c_child_level INTO temp_children_level, temp_topic_id;
CLOSE C_child_level;
Topic_child CREATE TEMPORARY TABLE IF NOT EXISTS
(t_topic_id, NUMBER, NUMBER, children_seq NUMBER of t_children_id);
WHILE temp_children_level > 0
LOOP
INSERT INTO topic_child (t_topic_id, t_children_id, children_seq)
values)
SELECT topic_id, children_id, children_level
OF topic_children
WHERE children_id = temp_topic_id);
temp_children_level: = temp_children_level - 1;
END LOOP;
OPEN FOR Topic_hierarchy_details_out
Select * from topic_child;
END P_PARENT_TREE;
END TOPIC_PKG;
--------------------------------------------------------------------------------------------------------------------------------------------
the error "PLS-00103: encountered the symbol"CREATE"when expec...
no idea why? or can be is there another way to write this queryCan you post some examples of data? And the expected results?
Looks like you can use a hierarchical query (START WITH... CONNECT BY), and that you do not have a Temp table (like I said before very rare in Oracle) -
MSN Outlook, hotmail "IE has blocked this site to display content with security certificate errors. Click here for options... »
How can I get rid of this irritating pop-up message whenever outlook is open?
Without knowing what are certificate errors, it is a shot-in-the-dark.
80 90% of certificate in Windows XP errors can be attributed to one of the following two issues:
- Time Date, time, time zone, or light of day on your computer is/is not set correctly. The time on your machine should be within 5 minutes of real time for certificates authenticate properly. Right-click on your taskbar clock, and select time settings to check the correct time. Synchronize time via Internet can solve this problem.
- Windows XP does a poor job of keeping its root certificates (certificates by which all other certificates are considered) up-to-date. The newer versions of Windows did a much better job. It certainly wouldn't hurt to update your root certificates and in many cases, this is all you need. For update, visit the following article:
"Members of the certificate program root Windows.
<>http://support.Microsoft.com/kb/931125 >
Then go down to the subsection titled "root Update Package (for Windows XP only). Then click on the option "update for root certificates for Windows XP... "the link. This will take you to the last downloadable update. Download the package on your computer and double-click it to update your certificates
One of the above should solve your problem.
HTH,
JW
-
Can u explain someone on table mutation error pls...
Can u explain someone on table mutation error pls...
Hello
Explain what, exactly?
As always, if you get an error, check the manual for Oracle error messages: http://docs.oracle.com/database/121/ERRMG/toc.htm
Use a search engine to find related sites, such as Tom ask: https://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551198119097816936
-
I have This Oracle 12c Procedure
CREATE OR REPLACE PROCEDURE LOGINCHECK(stmt IN CLOB)
AS
C INTEGER;
N INTEGER;
RC SYS_REFCURSOR;
BEGIN
C := SYS.DBMS_SQL.OPEN_CURSOR;
SYS.DBMS_SQL.PARSE(C,stmt,DBMS_SQL.native);
N := SYS.DBMS_SQL.EXECUTE(C);
SYS.DBMS_SQL.GET_NEXT_RESULT(C,RC);
SYS.DBMS_SQL.RETURN_RESULT(RC);
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
when OTHERS then
RAISE;
END LOGINCHECK;for example, to create an oracle with a xml or clob type IN FastInventory procedure and pass xml from this link https://drive.google.com/file/d/0BwAVQqYmX0-zQ1d1VnNmZndfcVE/view?usp=sharing
The of the stmt parameter is approximately 50000 characters.
DBMS_SQL. ANALYSIS gives error PLS-00172: string literal too long.
I'm passing stmt My .net code as parameter . OracleDbType.Clob then why this error occurring.
I use Oracle 12 c database. Visual Studio 2012, .net Framework 4;
OK now I have a response team of oracle.net where it says on tweeter
@OracleDOTNET team .NET oracle
Seems to be a bug specific to PL/SQL, because the error occurs on the DBMS_SQL. ANALYZE the call
Thank you all who have helped and at least tried to solve this problem.
Maybe you are looking for
-
How to make my user scripts work again
I have a user scripts that I use for my zoo game I play a they worked fine until yesterday. I get the shield who told me this page, I is not course when I mark it dangerous by firefox one do a refresh still can not get my user script
-
my activity tracker is incorrect
How can I fix the activity tracker? I went for a brisk 71 min yesterday and updated on the tracker section registered only 29 min?
-
Want to HP 4500 stuck now to print alignment page that prints nothing
Want to HP 4500 stuck now to print alignment page that prints nothing
-
Hi all I have a system of LabVIEW which takes advantage IMAQ tools and features of the Vision Development Module. A useful feature that I put in place is to be able to take a snapshot of the video stream and then subtract this single image among the
-
I think the upgrade of my Canon Rebel t1I in the Canon 60 d. What would be the advantanges of the 60 d. I've been looking at the specs and comparing the two cameras, but nothing is jumping on me. I only use my DSLR for a year, but I took classes