ORA-02315: incorrect number of arguments for default constructor [message #682624] |
Tue, 03 November 2020 10:10  |
 |
TroyHoopes
Messages: 2 Registered: November 2020
|
Junior Member |
|
|
How do I "look into" elements of my object?
I have an object table created with the following:
CREATE OR REPLACE TYPE ACT.tcs_acct_rec FORCE AS OBJECT
( client_id NUMBER(10),
can VARCHAR2(34 BYTE),
year NUMBER(4),
taxdtl_rec tcs_taxdtl, -- record object
valdtl_rec tcs_valdtl, -- record object
owner_rec tcs_owner, -- record object
apports_tab tcs_apports, -- table of record objects
receivables_tab tcs_receivables, -- table of record objects
specexems_tab tcs_specexems, -- table of record objects
notes_tab tcs_notes_tab); -- table of record objects
/
CREATE OR REPLACE TYPE ACT.tcs_acct_rec_tab FORCE AS TABLE OF tcs_acct_rec;
I wrote a function that is populating the data in this structure, I can see it in SQL*Plus, just not very clean to look at. I wrote the following query which returns the data:
SELECT CAST(MULTISET(
SELECT * FROM TABLE(trh_test_work(98000000, '100007', 2020))
WHERE client_id = 98000000
AND can = '100007'
AND year = 2005) AS tcs_acct_rec_tab)
FROM DUAL;
This second query does not let me look at the data I want to access in the given record. How do I properly reference to avoid the ORA-02315?
SELECT CAST(MULTISET(
SELECT client_id, can, year, owner_rec FROM TABLE(trh_test_work(98000000, '100007', 2020))
WHERE client_id = 98000000
AND can = '100007'
AND year = 2005) AS tcs_acct_rec_tab)
FROM DUAL;
|
|
|
|
|
Re: ORA-02315: incorrect number of arguments for default constructor [message #682629 is a reply to message #682628] |
Tue, 03 November 2020 12:49  |
 |
Michel Cadot
Messages: 68413 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
You already posted a type, why not the others? I don't what can be confidential, you can provide only (i.e. modify the types) what is necessary for your question. You can simulate your issue with a simple test case (which is the best way better than the actual types with dozen of columns or types that are not related to the issue, simplify it, note we don't need your account name in the statements like the one you posted).
All necessary types as mandatory for us to test what we may provide you. We can't be sure of our "solution" if we can't test it and it won't give anything and just waste everyone time we provide invalid statements.
|
|
|