SQL & PL/SQL :: PLS-00330 - Invalid Use Of Type Name Or Subtype Name
Aug 8, 2011
I got error invalid use of type name or subtype name in collection.
create or replace PROCEDURE sp_load_dasstage_security
AS
cursor cur_stag is
select Asset_id,ID_ISIN
ID_SEDOL1,
ID_CUSIP,
LONG_ULT_PARENT_COMP_NAME,
ISSUER,
[code]....
View 10 Replies
ADVERTISEMENT
Nov 2, 2012
I have created the following type
create or replace type type_sh_fld_rec
(
s_count count,
s_name varchar2(200),
e_date date);
/
create or replace type t_table_s_field as table of type_sh_fld_rec;
/
I have used these types in package pkg_shippers PROCEDURE process_shipments(userid);
when I run the following sql
select * from table(cast(DEV.PKG_SHIPPERS.process_shipments(324) AS T_TABLE_S_FIELD));
I get the following error.
ORA-00902 Invalid datatype.
I have tried to create the types and table from the sql prompt instead of the package spec, still no luck
Note: The sql statement works fine if I run it as schema owner but not as user who has all the privileges.
View 7 Replies
View Related
Jan 7, 2011
I keep on getting the Invalid cipher error whenever I do a call to DBMS_CRYPTO.Decrypt The flavor I am calling is the one taking the parameter list below:
(dst in out Blob,src in Blob,typ in pls_integer, key in raw,iv in raw)
So the issue happens on the third parameter: typ. It is a constant defined in the package representing the decryption algorithm I intend to use (AES256 in my case). So the call goes something like that in my pl/sql
dbms_crypto.Decrypt(vdecrypted, vcrypted,dbms_crypto.encrypt_aes256,vkey);
but it won't work. I also tried setting a variable like :
my_algo := dbms_crypto.encrypt_aes256;
and using it in the call but that gave the same result.
View 6 Replies
View Related
Mar 2, 2012
Im trying to generate a member procedure that allows the user to manual enter the required information via substitution variables. The manual INSERT INTO statements work but I cant seem to get it to work within a procedure.
Here is the code for the type, table andstandard insert:
CREATE TYPE toy_typ AS OBJECT
(toy_id NUMBER ( 5),
toy_name VARCHAR2 (20),
toy_cost NUMBER ( 4),
[code]...
the procedure complies but i get a warning error. When i also try to execute the code with either set values or substitutions i get either not enough or to many values error.
View 39 Replies
View Related
Jul 23, 2010
ORA-31180: DOM Type mismatch in invalid PL/SQL DOM handle
I am getting this error while debugging one of the package in PL/SQL developer or in TOAD. Is there any setting which we need to perform at the database level to debug the packages which have the code related to XML DOM. I am asking as the same code works exactly fine at one of the test database and it gives the above error on the other database.
View 10 Replies
View Related
Jan 2, 2013
I have 3 user defined collection types. I am trying to access the type3's attribute in type1 body (like backward accessing).
Ex. My Collection Types Structure (something like master detail structure)
create type type1 as object
(
attr1 varchar2(10),
attr2 varchar2(10),
member procedure function1
[code]...
so, in the type1 body i have to get or assign the value either to type2's attribute or type3's attribute. I have search all the in internet but i haven't find anything such. how to find the reverse method of accessing the super type's attribute(s) in sub type's body.
View 3 Replies
View Related
Oct 17, 2011
Is there some functions to convert the long type field data to varchar2 type?
View 2 Replies
View Related
Mar 8, 2013
I have created the below types and oracle objects.
create or replace type T_EMA_NP_SETDEL_RESP_REC as object
(
respCode number,
respDesc varchar2(255)
)
create or replace type T_EMA_NP_RANGE_LNPTICKET_TAB AS TABLE OF T_EMA_NP_RANGE_LNPTICKET_REC
create or replace type T_RANGE_TICKET_TAB AS TABLE OF T_RANGE_TICKET_REC
The following types are created in the Package specification
type t_resp_rec IS RECORD
(
resp_code number,
resp_desc varchar2(255)
);
--
subtype t_ema_lnpticket is T186_IN_REQ_PARAMETER.T186_EMA_LNPTICKET%TYPE; -- Number
type t_ema_lnpticket_tab is table of t_ema_lnpticket index by binary_integer;
I have the following two procedures
PROCEDURE getEMAReturnResponse(
p_in_call_request_id IN number,
p_ema_resp_rec IN t_ema_np_setdel_resp_rec,
p_ema_range_lnpticket_tab IN t_ema_np_range_lnpticket_tab,
p_endof_event IN varchar)
PROCEDURE Return_Response(p_in_call_request_id IN number,
p_ema_resp_rec IN t_ema_resp_rec,
p_ema_lnpticket_tab IN t_ema_lnpticket_tab,
p_endof_event IN varchar2)
getEMAReturnResponse Procedure:
Accessed by Java application to pass the values. Should call the Return_Response procedure and pass the values received from Java.
Return_Response Procedure
The p_ema_lnpticket_tab is a sort of array that can have multiple values. Please see the example of values. Has all the business rules and validation that should be adhered.
Example of Vaules
p_in_call_request_id = 1
p_ema_resp_rec = 12345, 'Operation Failed'
p_ema_lnpticket_tab = (1,2,4,5)
p_endof_event = Y
View 2 Replies
View Related
Feb 1, 2012
i am trying to run a script in which a command tries to create or replace a type.
i get this error:
ORA-02303: cannot drop or replace a type with type or table dependents
SQL>
SQL> --create a test user:
SQL>
SQL> create user tuser identified by tuser
[Code]....
Table created.
SQL>
SQL> --then change the type:
SQL>
SQL> create or replace type t1 as object (obj_type number(15))
2 /
create or replace type t1 as object (obj_type number(15))
*
ERROR at line 1:
ORA-02303: cannot drop or replace a type with type or table dependents
SQL>
SQL> --if i'll do FORCE action on the type - it'll corrupt my depandant table:
SQL>
SQL> drop type t1 FORCE
2 /
Type dropped.
SQL>
SQL>
SQL>
SQL>
SQL> desc dpntnt_table
Name Null? Type
----------------------------------------- -------- ----------------------------
ID1 NUMBER(7)
SQL>
SQL>
SQL>
SQL> --if i re-create it - my table is still corrupted:
SQL>
SQL>
SQL> create or replace type t1 as object (obj_type number(15))
2 /
Type created.
SQL>
SQL>
SQL>
SQL> desc dpntnt_table
Name Null? Type
----------------------------------------- -------- ----------------------------
ID1 NUMBER(7)
SQL>
--if i re-create it - my table is still corrupted:
create or replace type t1 as object (obj_type number(15))
/
desc dpntnt_table
[/code]
1. If i'll do drop type FORCE what will happen to the dependent object(might be a table for example) ?
2. I understand that this type is already assigned to some object, but i can't seem to find out which one.
how do i find out which object is depending on the type i want to create or replace?
View 4 Replies
View Related
Mar 8, 2013
I have created the below types and oracle objects.
create or replace type T_SETDEL_RESP_REC as object
(
respCode number,
respDesc varchar2(255)
)
--
create or replace type T_EMA_NP_RANGE_LNPTICKET_REC as object
(
ticket number
)
create or replace type T_RANGE_TICKET_TAB AS TABLE OF T_RANGE_TICKET_REC
The following type is created in the Package specification
type t_resp_rec IS RECORD
(
resp_code number,
resp_desc varchar2(255)
);
I have the following two procedures
Procedure getResponse(p_call_request_id IN number, p_resp_rec IN t_setdel_resp_rec,
p_range_ticket_tab IN t_range_icket_tab, p_endof_event IN varchar)
PROCEDURE ProcessResponse(p_call_request_id IN number, p_resp_rec IN t_resp_rec,
p_ticket_tab IN t_ticket_tab, p_endof_event IN varchar2)
The get Response procedure is a wrapper procedure exposed to Java to pass values. The Process Response procedure is a main procedure where all logics and business rules are handled.
The Problem is:
How can I pass the values from get Response procedure to Process Response procedure. So that rules and validations are applied. Please note the p_ticket_tab may have many ticket numbers corresponding to p_call_request_id.
Values E.g. :
p_call_request_id = 1
p_resp_rec (1234, 'Error found')
p_range_ticket_tab (1,2,3,4,5)
p_endof_event = 'Y'
View 7 Replies
View Related
Mar 26, 2013
I've the following function returning OBJECT type. how to call this function
CREATE OR REPLACE TYPE GET_EMP_OBJ is object
( emp_name varchar2(50) ,
mgr_id number,
dept_id number
);
[Code]...
The above function got created successfully. And i'm confused how to call this functions. I tried like below but didn't work
DECLARE
t_emp_info_1 GET_EMP_OBJ ;
BEGIN
t_emp_info_1 := get_emp(7566) ;
for i in 1..t_emp_info_1.COUNT
LOOP
DBMS_OUTPUT.put_line ('Values are'||i.emp_name ) ;
END LOOP;
END;
View 7 Replies
View Related
May 12, 2011
When i tried to drop a type using below command , i received errors
DROP TYPE JAM_ACAS_MSG_TYPE
ERROR at line 1: ORA-02303: cannot drop or replace a type with type or table dependents
View 32 Replies
View Related
Mar 7, 2013
I have been creating lot many threads around the same problem, however i thought i knew but realized I do not know or else do not know how to. I have created object type with an attribute READINGVALUE NUMBER(21,6)...How can i use type attribute on this object while declaring variable.....can we use type attribute on NESTED TABLES, similar to the db tables?
example
CREATE TYPE READING AS OBJECT(READINGVALUE NUMBER(21,6));
CREATE TABLE INTERVALREADINGS OF TYPE READING;
View 5 Replies
View Related
Jul 12, 2010
how to convert a record type to a table type?
View 4 Replies
View Related
Aug 17, 2013
I want to return the output of this query using one OUT parameter from the procedure using RECORD type or OBJECT type.
SELECT empno,ename,sal FROM emp WHERE deptno=30;
Let us assume the query is returning 50 records.
I want to send those 50 records to OUT parameter using record type or object type.
View 20 Replies
View Related
Mar 5, 2013
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
I'm new to this XML DB thing and also this is my first post.
I'm trying to populate collection type from XMLType. I was able to populate a table from XMLType but any way to populate the collection type. Here is the description of my problem:
Object Type:
CREATE OR REPLACE TYPE DOC_ROWTYPE AS OBJECT
(
REFERENCENUMBER VARCHAR2(255),
REQID NUMBER(12),
[Code]....
Collection Type:
CREATE OR REPLACE TYPE DOC_TABLETYPE IS TABLE OF DOC_ROWTYPE;
I have a physical table which is created when I registered a schema.
A table (Temp_Result) got created with column SYS_NC_ROWINFO$ which is of XMLType.
As you can see this is only a temporary table which will store the response XML which I want to finally get it to collection type.
XML to parse:
<code>
<TFSResponse>
<TFS>
<refNumber>12345</refNumber>
<reqId>123</reqId>
[Code]...
So each object in the collection is one TFS tag. how to implement this?
View 9 Replies
View Related
Dec 25, 2007
i want to get table name, constraint name, constraint type with join processes in string type. this is what i want: alter table tablename add constraint constraintname constrainttype(columnname)
View 1 Replies
View Related
Mar 29, 2013
I have an Type-object typeObj1 that consists another Type-object typeObj2. this def has another Type-object typeObj3. how to access variable declared inside typeObj3. I have syntax below for each Type.
CREATE OR REPLACE TYPE typeObj1
AS OBJECT
(
SYSTEM_IDENTIFER VARCHAR2(50),
PROCESS_TYPE VARCHAR2(50),
abc typeObj2
)
/
[Code]...
/I have tried to access the type-object in where clause in following way
FROM TABLE(CAST(I_typeObj1 AS typeObj1)) ITTPRC,
......
Where
.......
AND (ADDKEY.ADDTN_INFO_KEY_TYP_NM IN (SELECT ADDTN_INFO_KEY_TYP_NM FROM TABLE(ITTPRC.abc)))
AND (ADTINF.ADDTN_RQST_TYP_VAL_DT IN (SELECT ADDTN_RQST_VAL_DT FROM TABLE( ITTPRC.def)) OR ITTPRC.def IS NULL )
AND (ADTINF.ADDTN_RQST_TYP_VAL_NUM IN (SELECT ADDTN_RQST_VAL_NUM FROM TABLE( ITTPRC.def)) OR ITTPRC.def IS NULL )
AND (ADTINF.ADDTN_RQST_TYP_VALUE IN (SELECT ADDTN_RQST_VALUE FROM TABLE( ITTPRC.def)) OR ITTPRC.def IS NULL )
In this way i am able to access the variable inside typeObj3. But problem is i am getting error "ORA-01427 single-row subquery returns more than one row" when i pass more that one typeObj2.
I passed the values like this in proc execution.
T_T_A_I_V := typeObj3('asdasd',NULL,NULL),
typeObj3('String654',NULL,NULL),
typeObj3('abcdef',NULL,NULL));
T_T_A_I_I := typeObj2('CampusCode',T_T_A_I_V),
typeObj2('PlanNumber',T_T_A_I_V);
What i have done is removed typeObj3 from typeObj2, variables defined in typeObj3 are added in typeObj2 then i got ride of above error. is it correct
View 4 Replies
View Related
Oct 23, 2012
i what to update a column data type am geting this error
ORA-02267: column type incompatible with referenced column type
my query is
when i run
SELECT b.table_name||
' joins to the '||
a.table_name||
' table on '||
c.column_name||
' = '||
d.column_name Table_relationships
[code]....
View 9 Replies
View Related
Jul 9, 2013
I CREATE A COLUMN AS 'STATUS VARCHAR2(40)' IN EMP1 TABLE IN SCOTT USER
EMP1 TABLE IS A DUPLICATE TABLE OF EMP
CREATE OR REPLACE PACKAGE SAL_STATUS IS
PROCEDURE SAL_STATUS;
END SAL_STATUS;
[code]...
PACKAGE CREATED SUCCESSFULLY...
WHEN I EXECUTE THIS PACKAGE]
BEGIN
SAL_STATUS.LOAN_STATUS;
END;
IT THROW ERROR AS
BEGIN
*
ERROR at line 1:
ORA-01410: invalid ROWID
ORA-06512: at "SCOTT.SAL_STATUS", line 21
ORA-06512: at line 2
HOW CAN I OVERCOME THIS ERROR..
View 7 Replies
View Related
Jun 12, 2013
I have the following sample data:
Sample Data
WITH DATA AS
(
SELECT '100' GRP, '01-JAN-2012' EFFECTIVE_DATE, '30-JUN-2012' TERMINATION_DATE from DUAL
UNION ALL
SELECT '100' GRP, '01-JUL-2012' EFFECTIVE_DATE, '31-JUL-2012' FROM DUAL
union all
[code]......
Query Result
10001-JAN-201230-JUN-2012
10001-JUL-201231-JUL-2012
10031-JUL-201205-AUG-2012
10001-AUG-201215-AUG-2012
10017-AUG-201231-AUG-2012
Expected Output
10031-JUL-201205-AUG-2012
10017-AUG-201231-AUG-2012
The above mentioned output is produced by using the following business rules:
-- row no 1 = Valid records
-- row no 2 = effective date is 1 day after termination date of row no 1. Means valid records
-- row no 3 = effective date is equal to the row no 2 termination date -- Means invalid record
-- row no 4 = effective date is 1 day after termination date of row no 2 Means valid records
-- row no 5 = The gap between row no 4 termination date and row no 5 effective date is more than 1 day. Means record is invalid.
Query always compare effective date with previous valid record termination date by using the above mentioned condition and return result accordingly.
Summary is that there should be 1 day gap between termination date and next effective date as well as effective date
is always less than termination date in same rows. In addition, if record is invalid then next record check with previous valid record termination date.
View 15 Replies
View Related
Mar 8, 2011
create or replace TRIGGER "tddev.stage_column" BEFORE
INSERT ON SRC_STG_INDEX_MAP_TABLE
FOR EACH ROW
DECLARE
[Code]....
The trigger fails saying invalid table_name for all_tab_columns.
View 9 Replies
View Related
Oct 30, 2011
I am trying to do an update with an anonymous PL/SQL block because it has been absolutely impossible to get by the infamous "Single-row subquery returns multiple rows" Whatever.So this code below work... Obviously, I am updating it to a constant.. OK, duh.. Of course it works, it's easy.... Now, I really need to update it to a value in another table that is in my cursor. I believe that I probably need to declare a secondary cursor.
I'm just getting back in the DBA saddle, so I'm a little rusty..
set serveroutput on;
DECLARE
numrows NUMBER := 0;
total NUMBER := 0;
CURSOR upd_record_cur IS SELECT m.rowid, m.swcm_cycle, t.newcycle, p.aprem_no from toad.fswcmas m,
[code]...
Not so good here
ORA-06550: line 20, column 53:
PL/SQL: ORA-00904: "TOAD"."TTP43425_LOAD"."NEWCYCLE": invalid identifier
ORA-06550: line 20, column 10:
PL/SQL: SQL Statement ignored
Doesn't work...
BEGIN
FOR upd_rec IN upd_record_cur LOOP
update toad.fswcmas sw set sw.swcm_cycle = toad.ttp43425_load.newcycle
WHERE rowid = upd_rec.rowid;
total := total + 1;
View 17 Replies
View Related
Mar 8, 2012
There are 4 packages got invalid 2 days back. when I analyze the database I came to know that there are 5 tables got truncated and 2 tables got altered during the issue period through the code. Those truncated tables have the indirect relationship with these 4 packages.but there is no any relation between these packages and altered table.
Also during that time I got the below error in my alert log.I am sure the cause this error is the invalid packages.
ORA-00600: internal error code, arguments: [kkxprpic8], [], [], [], [], [], [], []
I know if any alteration happens in a table, the refrence package will be getting as invalid. Apart from this, is there anyother cause to bring the package into invalid status? How to proceed further to find the root cause of thses invalid package?
View 6 Replies
View Related
Dec 2, 2010
procedure vieworderstatus(in_CALL_ID IN NUMBER ,
in_DAYS_OF_HISTORY in number ,
out_SUPLY_REORDR_STATUS_LST OUT supplyreordrlist ,
out_ERR_CODE OUT NUMBER,
out_ERR_MESSAGE out varchar2);
This procedure takes retrievs cust_id for given input call_id. The procedure then retrieves order information for that customer and returns using the out ref cursor. I need to test the scenario where the user passes invalid call_id.
The following query returns no data for call_id = 12345 ( invalid call_id)
select fk_cust_id into v_cust_id
from xcom_call
where call_id = in_CALL_ID;
in such cases; I just need to return null ref cursor and log the error but right now when I pass invalid call_id ; I am getting "invalid cursor" error.How do I handle this ?
View 35 Replies
View Related
Dec 3, 2012
select to_char(to_date(mcih_date, 'dd-mm-yyyy')),
mcih_terms from I_MEMO_CONF_H;
TO_CHAR(TO_DATE(MCIH_DATE,'DD-MCIH_TERMS
118-OCT-1245
206-NOV-1222
[Code]...
why i am getting this error?
View 3 Replies
View Related
Jun 12, 2013
Oracle Version : Oracle Database 11g Express Edition Release 11.2.0.2.0 - ProductionI have following sample data:
Sample DataWITH DATA AS( SELECT '100' GRP, '01-JAN-2012' EFFECTIVE_DATE, '30-JUN-2012' TERMINATION_DATE
from DUAL
UNION ALL
SELECT '100' GRP, '01-JUL-2012' EFFECTIVE_DATE, '31-JUL-2012'
FROM DUAL
UNION ALL SELECT '100' .
[Code]....
Business Rules: I have to get all invalid records according to the below business rules.
- row no 1 and 2 are valid records because row no 2 effective date start after the termination date of row no 1
- row no 3 is invalid record because effective date start with termination date of row no 2
- row no 4 is valid record because effective date is after or greater than previous valid record termination date that is row no 2 (31-jul-2012).
- row no 5 is invalid record effective date is smaller than previous termination date
- row no 6 is valid record because effective date is greater than previous valid termination date that is row no 4 .
- row no 7 is invalid record because same data already exist in row no 6
- row no 8 is valid because effective date is greater than previous valid record that is row no 6 termination date.
View 17 Replies
View Related
Jun 21, 2013
Oracle sys object are Invalid,But database working fine. How to fix these problem, I don't have oracle support,
Database Dba_registry contain are All Valid.But sys object getting Invalid.
Oracle 10g 10.2.0.5 Standard
OWNERCOUNT(*)
MDSYS359
DMSYS24
PUBLIC147
CTXSYS3
OLAPSYS32
XDB 5
SYS 141
Dba_registry
COMP_IDSTATUS
APSOPTION OFF
SDOOPTION OFF
ODMOPTION OFF
AMDOPTION OFF
XOQOPTION OFF
OWMVALID
CATALOGVALID
CATPROCVALID
JAVAVMVALID
XMLVALID
CATJAVAVALID
RULVALID
EXFVALID
CONTEXTVALID
XDBVALID
EMVALID
ORDIMVALID
View 3 Replies
View Related
May 6, 2008
I restored a date in my database (the backup of that date was taked by a snap on Windows Server 2003), now I try to startup the database it gives me the following error
ORA-02778: Name given for the log directory is invalid
here is a copy of my spfile
*.background_dump_dest='H:\oracle\oradata\gdwh2401\BDUMP'
*.bitmap_merge_area_size=16777216
*.cluster_database=FALSE
*.compatible='9.2.0.0.0'
*.control_files='G:\oracle\oradata\DWHLIVE\CONTROL01.CTL','H:\oracle\oradata\DWHLIVE\CONTROL02.CTL','I:\oracle\oradata\DWHLIVE\CONTROL03.CTL'
*.core_dump_dest='H:\oracle\oradata\gdwh2401\CDUMP'
[code]....
this is a picture of my alert_log file
Tue May 06 09:42:15 2008
Starting background process EMN0
EMN0 started with pid=53, OS id=13704
Tue May 06 09:42:16 2008
Shutting down instance: further logons disabled
Tue May 06 09:42:18 2008
Stopping background process QMNC
Tue May 06 09:42:19 2008
[code]....
View 5 Replies
View Related
Jun 15, 2010
I get the ORA-00911: invalid character. I tried using quotation marks but does not work. The error is on line 25, if you change it the error just change to statement ended incorrectly.
SELECT ''
,TMTask.TMTaskSeqNo
,TMTask.TMWorkFlowTypeSeqNo
[Code].....
View 1 Replies
View Related