Initializing values to a custom data type
-
02-11-2019 - |
Question
I have defined a custom data type which I need to use in my procedure. Give below is my data type.
CREATE or REPLACE TYPE CUSTOM_DATATYPE AS object(
chkinvpre VARCHAR2(100),
orderid NUMBER(10),
deldate DATE,
fowno VARCHAR2(40),
fowname VARCHAR2(40),
fowadd1 VARCHAR2(40),
fowadd2 VARCHAR2(40),
fowadd3 VARCHAR2(40),
fowadd4 VARCHAR2(40),
packtype VARCHAR2(40),
noofpacktype VARCHAR2(40),
gweight VARCHAR2(40),
dimension VARCHAR2(40),
hawb VARCHAR2(40)
)
NOT final;
Now, I am trying to initialize this data type to call my procedure . Given below is the code.
declare
rajesh CUSTOM_DATATYPE;
begin
rajesh:=('xyz',123,'13-02-14','12','fdfd','add1','add2','add3','add4','packtype','noofpacktype','1234','dfs','dde');
DN_Generated(rajesh);
end;
/
And here is the error that I am getting.
Error starting at line 1 in command:
declare
rajesh CUSTOM_DATATYPE;
begin
rajesh:=('xyz',123,'13-02-14','12','fdfd','add1','add2','add3','add4','packtype','noofpacktype','1234','dfs','dde');
DN_Generated(rajesh);
end;
Error report:
ORA-06550: line 4, column 10:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 4, column 2:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
Please let me know the error. Thanks in advance.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange