I get an error-invalid data type
DECLARECURSOR med_rec_cur
IS
SELECT *.
OF temp_records_med;
p_success NUMBER;
strQuery VARCHAR2 (10000);
v_count NUMBER;
v_filename temp_records_med.filename%TYPE;
TYPE med_rec_tab IS TABLE OF temp_records_med % ROWTYPE;
ErrNum NUMBER;
Slno_tab TYPE IS a TABLE OF VARCHAR2 (100);
v_med_rec_tab med_rec_tab;
dml_errors EXCEPTION;
v_slno NUMBER;
v_all_slno VARCHAR2 (1000);
v_slno_tab slno_tab;
tba_slno temp_records_med.slno%type;
BEGIN
OPEN med_rec_cur.
LOOP
BEGIN
EXTRACTION med_rec_cur
LOOSE COLLECTION v_med_rec_tab LIMIT 1000;
FORALL I IN 1... v_med_rec_tab. COUNT SAVE EXCEPTIONS
INSERT INTO meddetail
VALUES v_med_rec_tab (i)
RETURN slno BULK COLLECT INTO v_slno_tab;
EXCEPTION
WHEN dml_errors
THEN
v_all_slno: = ', '. To_char (v_all_slno);
END;
EXIT WHEN med_rec_cur % NOTFOUND;
END LOOP;
CLOSE Med_rec_cur;
INSERT INTO BOSSDRAGON - INVALID DATA TYPE
SELECT * FROM TEMP_RECORDS_MED WHERE SLNO NOT IN (SELECT tba_slno FROM)
(TABLE (CAST (v_slno_tab AS slno_tab) tba_slno))) ;
END;
Published by: user8731258 on Sep 6, 2010 23:14
Casting will not change the fact that you have a local collection type in a SQL statement, which is not allowed. You can create a stand-alone type with CREATE TYPE? Or use something like SYS. DBMS_DEBUG_VC2COLL that is already defined.
You don't need a CAST explicitly in the TABLE expressions after around Oracle 8i.
Tags: Database
Similar Questions
-
ORA-00902 error invalid data type when you use CAST in the PL/SQL Package
I'm getting ORA - 00902 Datatype not valid error when you use cast in getEmpValues (see code below) method in the package I created.
I don't know what is the cause of the error. Any help would be appreciated
CREATE OR REPLACE PACKAGE TEST. TEST_PKG AS
ARRAY TYPE MyTableType IS NUMBER;
TYPE REF_CURSOR IS REF CURSOR;
FUNCTION str2tbl (p_str IN VARCHAR2)
RETURN myTableType;
PROCEDURE getContactValues (p_ParameterString IN VARCHAR2, p_Cursor1 to REF_CURSOR);
END TEST_PKG;
CREATE OR REPLACE PACKAGE BODY TEST. TEST_PKG AS
FUNCTION str2tbl (p_str IN VARCHAR2)
RETURN myTableType
AS
l_str LONG default p_str | ',';
l_n NUMBER;
myTableType l_data: = myTabletype();
BEGIN
LOOP
l_n: = INSTR (l_str, ",");
WHEN the OUTPUT (nvl(l_n,0) = 0);
l_data.extend;
l_data (l_data.count): = ltrim (rtrim (substr(l_str,1,l_n-1)));
l_str: = substr (l_str, l_n + 1);
END LOOP;
L_data return;
END;
/*
p_ParameterString is a string of the form 3, 6, 8, 9'
*/
PROCEDURE getEmpValues (p_ParameterString IN VARCHAR2, p_Cursor1 to REF_CURSOR)
AS
BEGIN
OPEN FOR P_Cursor1
SELECT *.
FROM EMP
WHERE EMP_ID IN (SELECT *)
OF THE (SELECT CAST (TEST.) (TEST_PKG.str2tbl (p_ParameterString) as myTableType) double)
);
END getEmpValues;
END TEST_PKG;ARRAY TYPE MyTableType IS NUMBER;
This type must be created outside of the package as a SQL type if it must be used in a select statement.
-
Creating a table: invalid data type
Hello
I want to create two tables, which is why the following script:
create table wine cellars
(winecellarname varchar2 (50) primary key,)
location varchar2 (50).
owner varchar2 (50).
Phone varchar2 (50).
Museum char(1),
BLOB of logo
);
create table wines
(winetype, varchar2 (50))
winecathegory varchar2 (50).
year number 4.
winecellarname varchar2 (50).
VARCHAR2 (50) of origin;
primary key (winetype, winecathegory, year, winecellarname).
update the foreign key (winecellarname) winecellarname references on Delete on cascade
);
But in line 13 of the script, which is the line winetype varchar2 (50), gives the text following error-> invalid data type
Everyone knows that is the cause? I used Toad as a client to manage the script and Oracle 10 g as a server.
Thank you. concerningThen, when you create tables in Oracle, referencing foreign key, you don t need to use on the update clause to maintain the reference to integrity? This is valid for MySQL Server?
not sure that your average, but you have to update... use only on the deletion clause.
read reference to url... I told you -
From a function table: invalid data type error
Hello
I'm a ORA-00902: invalid data type error when I try to call the function from a select statement below. Here, I am leaving an array from a function.
create or replace package pkg10 as type tabletype1 is table of table1%rowtype index by binary_integer; function func1 return tabletype1; end pkg10;
create or replace package body pkg10 as function func1 return tabletype1 is v_tab1 tabletype1; idx integer; begin idx := 1; for i in (select * from table1) loop v_tab1(idx).name1 := i.name1; v_tab1(idx).key := i.key; idx := idx+1; end loop; return v_tab1; end func1; end pkg10;
Please point out to me where I'm wrong.select * from table(pkg10.func1);
Thank youSathya Vamsi says:
HelloI'm a ORA-00902: invalid data type error when I try to call the function from a select statement below. Here, I am leaving an array from a function.
create or replace package pkg10 as type tabletype1 is table of table1%rowtype index by binary_integer; function func1 return tabletype1; end pkg10;
create or replace package body pkg10 as function func1 return tabletype1 is v_tab1 tabletype1; idx integer; begin idx := 1; for i in (select * from table1) loop v_tab1(idx).name1 := i.name1; v_tab1(idx).key := i.key; idx := idx+1; end loop; return v_tab1; end func1; end pkg10;
select * from table(pkg10.func1);
Please point out to me where I'm wrong.
Thank you
you try to use a data type of PL/SQL as part of an SQL statement. is NOT authorized.
-
I have developed and delivered a system in Germany several years ago. He worked then. But the cRIO was damaged and replaced by a newer model, and does not now. I suspect (and Support technical OR agree) it's a problem of software version, which could be solved with the NOT-MAX Software Installer. But I do not have access to the system myself, and correspondence is slow and tedious.
The original system was a cRIO-9073, developed with LabView 2009. He used the implicit Messaging. The ID of Instance, sizes, IP addresses, etc everything has worked very well.
The current system is a cRIO-9074, with LabView DURATION 14.0 (I guess that LV 2014), Scan Engine 4.3, NI - Industrial Communications for Ethernet/IP 14.0.0, etc. Programs FPGA and processor are responsible and seem to work in the cRIO. The "EthernetIP Set Assembly Instance Data.vi' will return no error. But the PLC just pointing out "(Code 16 #0315)" connection request error: invalid segment type "." We looked at intellectual property (the mistake was different), sizes and body #s.
The PLC doesn't have to all be modified.
Anyone know if there is no problem of compatibility with LV-2014 and Ethernet/IP 14.0.0? Or if there are all the other required packages?
I am including the NOT-Max reports.
Hi ZX81
To help you 2009 application to work with the new cRIO, you must deploy it to the device. You must in order to deploy the cRIO, make sure it has the same versions of software that you used with the old cRIO.
You can format the cRIO NI MAX and deploy the application of LV, 2009. However, if you do not have access to the cRIO or your client does not have the necessary software, you can deploy the application in another cRIO with software (cRIO same model and same modules as your client) and create a picture of it and send it to your customer so that it can deploy the cRIO even without the software on his computer. The following document explains how to do this.
WenR
-
ORA-00902: invalid data type on xmltable
Hello
I learn XMLTABLE but not able to run the following queries,
with xml11g as ( select '<?xml version="1.0"?> <purchaseorder orderdate="1999-10-20"> <shipto country="us"> <name>alice smith</name> <street>123 maple street</street> <city>mill valley</city> <state>ca</state> <zip>90952</zip> </shipto> <billto country="us"> <name>robert smith</name> <street>8 oak avenue</street> <city>old town</city> <state>pa</state> <zip>95819</zip> </billto> <comment>hurry, my lawn is going wild!</comment> <items> <item partnum="872-aa"> <productname>lawnmower</productname> <quantity>1</quantity> <usprice>148.95</usprice> <comment>confirm this is electric</comment> </item> <item partnum="926-aa"> <productname>baby monitor</productname> <quantity>1</quantity> <usprice>39.98</usprice> <shipdate>1999-05-21</shipdate> </item> </items> </purchaseorder>' myxml from dual ) select s.*, b.* from xml11g t, xmltable ('/purchaseorder' passing xmlparse(document t.myxml) columns "shipto" xml, "billto" xml ) x, xmltable ('/shipto' passing x."shipto" columns "name" char(20), "street" char(40), "city" char(40), "state" char(2), "zip" number(10) ) s, xmltable ('/billto' passing x."billto" columns "name" char(20), "street" char(40), "city" char(40), "state" char(2), "zip" number(10) ) b;
It is showing me special suite
< zip > 90952 < / zip >
*
ERROR on line 10:
ORA-00902: invalid data type
Please guide me what I'm missing here.
Thanks and greetings
Alexander gelin
For me the (slightly modified) works:
[sql]
with xml11g as ( Select ' Alice Smith 123 maple Street Mill Valley CA 90952 Robert Smith 8 Oak avenue old town PA 95819 Hurry, my lawn is going wild lawn mower 1 148.95 confirm this is electric baby monitor 1 39.98 1999-05-21 "double myxml. ) Select *. of xml11g t. XMLTable ('/ purchaseorder' by the way) xmlParse (document t.myxml) columns "shipto" XMLtype, "billto" XMLtype ) x, XMLTable ("' / shipto' passing x." ShipTo") columns 'name' char (20) , 40 "Street." 'city' 40, 'State' (2) tank. "zip" INTEGER + 1 , XMLTable ("' / billto' passing x." BillTo") columns 'name' char (20), 40 "Street." 'city' 40, 'State' (2) tank. "zip" INTEGER ) b ;
[SQL]
-
Hello
I have the following tables:
create table wine cellars
(winecellarname varchar2 (50) primary key,)
location varchar2 (50).
owner varchar2 (50).
Phone varchar2 (50).
Museum char(1),
BLOB of logo
);
create table wines
(winetype, varchar2 (50))
winecathegory varchar2 (50).
year number 4.
winecellarname varchar2 (50).
VARCHAR2 (50) of origin;
primary key (winetype, winecathegory, year, winecellarname).
Foreign key (winecellarname) references winecellarname on delete cascade
);
But in the line which belongs to the sentence: create vdt TOAD gives me the following error: error on line 13. ORA-00902: invalid data Type
I don't understand the reason for this error and I can fix it.
Thank you. ConcerningFound the problem:
create table vino ( tipovino varchar2(50), categoriavino varchar2(50), anovendimia number(4), nombrebodega varchar2(50), denominacionorigen varchar2(50), precio/lproduc number(5), litrosproduc number(10), precio/lpublico number(5), primary key (tipovino,categoriavino,anovendimia,nombrebodega), foreign key (nombrebodega) references bodega on delete cascade ) /
' Precio/lproduc' and "price/lproduc" columns contain a ' / ', which is not legal!
Try this:
create table vino ( tipovino varchar2(50), categoriavino varchar2(50), anovendimia number(4), nombrebodega varchar2(50), denominacionorigen varchar2(50), precio_lproduc number(5), litrosproduc number(10), precio_lpublico number(5), primary key (tipovino,categoriavino,anovendimia,nombrebodega), foreign key (nombrebodega) references bodega on delete cascade ) /
and it works perfectly. (See where I replaced ' / ' by '_' in two of these column names?)
Hope that helps,
-Mark
PS The reminder! Don't forget to close the issue and awarded points accordingly.
-
table font PL/SQL: ORA-00902: invalid data type
I m is
PL/SQL: ORA-00902: invalid data type
error in
OPEN FOR PPymtCur
SELECT *.
TABLE (CAST (up_gap_tra_reports.myArray AS traArray));
in my up_gap_tra_reports package.
CREATE OR REPLACE PACKAGE GAPSDVEL.up_gap_tra_reports
AS
TraRecord RECORD TYPE IS
(
group1StudEnrol NUMBER (6.1).
group2StudEnrol NUMBER (6.1).
pymtAmt gap_payment.NET_AMT%TYPE
);
TYPE traArray IS TABLE OF THE traRecord;
myArray traArray: = traArray();
END up_gap_tra_reports;
I have alreay hv declared of type traArray.
pls help me solve this problem.Meghna wrote:
is it possible to use the collection pl/sql in SQL or refcur without creating it because I'm not able to create the type of database.The only way I know is function in pipeline:
create or replace package pkg1 is type traRecord is record( ename emp.ename%type, sal emp.sal%type ); TYPE traArray IS TABLE OF traRecord; function f1 return traArray pipelined; end; / create or replace package body pkg1 is function f1 return traArray pipelined is v_rec traRecord; begin v_rec.ename := 'Sam'; v_rec.sal := 1000; pipe row(v_rec); v_rec.ename := 'John'; v_rec.sal := 1500; pipe row(v_rec); v_rec.ename := 'Mary'; v_rec.sal := 2000; pipe row(v_rec); return; end; end; /
Now, you can:
SQL> select * from table(pkg1.f1) 2 / ENAME SAL ---------- ---------- Sam 1000 John 1500 Mary 2000 SQL>
Don't forget, it will create the generated system types:
SQL> select type_name from user_types 2 / TYPE_NAME ------------------------------ SYS_PLSQL_73305_9_1 SYS_PLSQL_73305_DUMMY_1 SYS_PLSQL_73305_34_1 SQL> desc SYS_PLSQL_73305_9_1 Name Null? Type ----------------------------------------- -------- ---------------------------- ENAME VARCHAR2(10) SAL NUMBER(7,2) SQL> desc SYS_PLSQL_73305_DUMMY_1 SYS_PLSQL_73305_DUMMY_1 TABLE OF NUMBER SQL> desc SYS_PLSQL_73305_34_1 SYS_PLSQL_73305_34_1 TABLE OF SYS_PLSQL_73305_9_1 Name Null? Type ----------------------------------------- -------- ---------------------------- ENAME VARCHAR2(10) SAL NUMBER(7,2) SQL>
SY.
-
Why do I get the error invalid name anchor in muse adobe
Why do I get the error invalid name anchor in muse adobe
has responded to your other Candran.
-
I'm trying to timestamp (RFC 3161) a pdf file using my own timestamp server equipment but still get an error: 'Invalid certificate for use' (text Original - certificado valido para uso e nao pt_BR:O). How can I get more information on what I'm missing or whats wrong with the certificate?
I found the answer to my problem: it was linked to the plug of the TSA and its attribute 'Extended Key use '.
In any case, thanks for your help. Just to answer the questions:
Version: Adobe Reader XI
Tried both:
(A) the time stamp for the signature: signature put under without timestamp and an alert
(B) the document timestamp: no changes and an alert
-
table (cast - invalid data type problem
Hi all
Baseline scenario:
--------------------------
PACKAGE
--------------------------
create or replace
PACKAGE C2_PAYMENT_DOC IS
Bin_array TYPE TABLE IS NUMBER
INDEX OF DIRECTORY;
FUNCTION test_fun (l_doc_id IN integer) RETURN bin_array;
--------------------------
PACKAGE_BODY
--------------------------
create or replace
package C2_PAYMENT_DOC as body
Bin_array test_fun (l_doc_id-IN integer) FUNCTION RETURNS IS
l_gross bin_array;
Start
c2_purchase_invoice.get_inv_gross_amount (l_doc_id, l_gross (1));
Return l_gross;
end;
END;
--------------------------
QUERY
--------------------------
Select * from Table (Cast (c2_payment_doc.test_fun (1) as bin_array));
The query result is ORA-00902: invalid data type
How can I make the valid select statement?
Thanks in advance,
BartekYou cannot use local collection types in SQL. You must create a bin_array of type like nested SQL table type. In addition, depending on the version you will not cast:
SQL> CREATE OR REPLACE 2 TYPE bin_array 3 AS TABLE OF NUMBER 4 / Type created. SQL> create or replace 2 PACKAGE C2_PAYMENT_DOC IS 3 FUNCTION test_fun(l_doc_id IN integer) RETURN bin_array; 4 end; 5 / Package created. SQL> create or replace 2 package body C2_PAYMENT_DOC as 3 4 FUNCTION test_fun (l_doc_id IN integer) RETURN bin_array IS 5 l_gross bin_array := bin_array(); 6 begin 7 l_gross.extend; 8 l_gross(1) := l_doc_id; 9 return l_gross; 10 end; 11 END; 12 / Package body created. SQL> select * from Table(Cast(c2_payment_doc.test_fun(1) As bin_array)); COLUMN_VALUE ------------ 1 SQL> select * from Table(c2_payment_doc.test_fun(1)) 2 / COLUMN_VALUE ------------ 1 SQL>
SY.
-
cfgrid / cfgridupdate error with an invalid data type
I have a problem using cfgrid controls.
I get the following error message:
"Error casting an object of type by an incompatible type. This usually indicates an error in programming in Java, although it could also mean that you tried to use a foreign object in a different way, that it was designed. »
The error occurs when I run this code:
< IsDefined ("form.gridEntered") cfif >
< cfgridupdate grid = "FirstGrid" dataSource = "" #dsn # "Keyonly ="true"tableName ="tblManager">"
< / cfif >
It connects to a mySQL 4.1 database.
I think that the problem is to do with a field, I added called 'Active' of the INT data type (1). I use that as a Boolean value as far as I know, is the nearest equivalent in mySQL.
In my < cfgrid > I've added the next column.
< cfgridcolumn name = 'Active' type = 'boolean' display = "Yes" width = "40" header = "On" "BOLD" = "true" / >
That shows a box and that's the look I want to reach on the grid.
I think that this causes Java error. What should I do to allow the submission to the grid of this type of data, please?
Thank you for your time and your help.To answer my own question on that...
cfgridupdate wasn't working so I wrote a regular block of code to make the necessary changes when you submit a grid. -
Hi all
I am facing a problem while creating a BI reports to the SQL Server 2008 Database.
Access to columns of data type "uniqueidentifier" I get error [nQSError: 43119]:-the data type: 25 is not supported.
- OBIEE 11.1.1.6.11 on Linux x86_64 servers is hosted by the Services of Oracle Cloud.
- Using last "ODBC driver for SQL server 11" for connection (also tried driver "DataDirect SQL Server 6.0 native Wire Protocol").
- No "Uniqueidentifier" data type columns display correctly in reports.
- I tried to change the columns of data type "Uniqueidentifier" to char (36), VARCHAR (36), VARCHAR (40), types of binary data (16) in the physical layer on various suggestions but error still there.
Same columns questioned the SQL Developer (using third-party jTDS JDBC driver "jtds - 1.2.7 - dist") I am able to see these "uniqueidentifier" data columns. record sample:-"CB350576-FCD8-DE11-B111-002219598619".
Please advice if this is a bug or I'm missing some property of SQL server database settings.
Thanks in advance.
Yes Srini,
This type of column becomes UNKNOWN when they are imported into SPR but its strange after changing to VARCHAR (36), we can use it for joining tables without any problem.
Only issue I'm facing now is the limitation to use in queries like calculate the total number of incidents (in my case incidentid is the primary key).
But I've found a workaround. I am formulating a measure in MDB layer to get the number of total incidents as {CASE WHEN
is NULL then 0 otherwise 1 END}. the aggregation is defined on the sum and I get incident count works correctly. Thanks for your help.
-
ORA-00902: invalid data type
Hello
What is the problem with my NUMBER data type:
Thank you.SQL> create table sale (purchase-no NUMBER (9) CONSTRAINT sale-purchase-no-pk PR IMARY KEY , costumer-id NUMBER (9) CONSTRAINT sale-customer-id-nk NOT NULL); create table sale (purchase-no NUMBER (9) CONSTRAINT sale-purchase-no-pk PRIMARY KEY , costumer-id NUMBER (9) CONSTRAINT sale-customer-id-nk NOT NULL) * ERROR at line 1: ORA-00902: invalid datatype
Your column and constraint names have traits that are not allowed in the names of identifiers.
Try using instead underscore traits.
-
STD R2 Windows Server 2012 was working fine this morning by restarting the server now, we get the error to Choose your type of keyboard
Hello
Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.
http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer
See you soon.
Maybe you are looking for
-
Myipone4.LockServer, Error403.404
Myipone4.IMEI: [deleted ed].Series: [ed removed].version:5.1.1(9b206)Can'tdownload Update.app, Game, iOS,.Software.NewVersion.initunesstore.Don'topensafarifile, Server.onmobile.Camera360.LockedServer.Error403.404Can'tChangenewappleIDpasswordiniTunesS
-
install windows xp sp3 on my laptop dell now its inop
I have a Dell Inspiron 1100 2004 who has windows xp, I tried to clean the hard drive of the laptop, I was able to get the windows xp reinstallation cd Dell. I installed the cd after the cd download finished. a window asking if I want to "activate" wi
-
Cannot delete pictures "Permission Error"
My daughter downloaded the photos of her phone and now I can't delete them. He said I must have permission to do so. I am the administrator on the computer and it does not require a password. I even tried to delete them in safe mode, but it does not
-
No network level authentication supported Win 7 Home Premiun SP1
I work from home with a new company and now I am not able to connect to the remote desktop, because he says that the NLA is not supported on my system. Trying him I don't have the option to do so. My previous employers, team COMPUTER messed with some
-
I have a network of video editing. Some of the NLE * computer OS is windows xp and some of them is windows7 They all work great with local files (files stored in their hard drives). Problem occur when the files are imported from network drives in NLE