Key next item [message #521124] |
Fri, 26 August 2011 08:33 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
shahzad-ul-hasan
Messages: 643 Registered: August 2002
|
Senior Member |
|
|
Dear Sir,
Table Structure:
Name of Table: info
Column: ID, Name, Cell,Cell1,Ref
i want to insert these values in a table through ref (key next item).
-----------------------------------------------------------
Key next Item Triger Code:
DECLARE
A NUMBER;
B NUMBER;
BEGIN
SELECT :CELL,:CELL1 INTO A,B FROM DUAL;
insert into out (receiver,msg,id,status)
values
('+'||a,'Respected Parents! Your Child has been given admission in ICON College Chiniot.
ICON shall produce better result than your expectations INSHALLAH...be an ICON',:info.id,'send');
insert into out (receiver,msg,id,status)
values
('+'||B,'Respected Parents! Your Child has been given admission in ICON College Chiniot.ICON shall produce better result than your expectations INSHALLAH...be an ICON',:info.id,'send');
COMMIT;
NEXT_BLOCK;
END;
-------------------------------------------------------
but when i press enter(ref Key_next_item) it will return error:
FRM-40735: KEY_NEXT_ITEM RAISED UNHANLEDED EXCEPTION ERROR: ORA 40102
PLS ADVISED. i want to send thses msg in out table.pls advised.
|
|
|
Re: Key next item [message #521127 is a reply to message #521124] |
Fri, 26 August 2011 08:44 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Are you sure it's ORA-40102?
40102, 00000, "invalid input %s for data mining operation %s"
// *Cause: The input parameter is either null or invalid for the given
// operation.
// *Action: Provide a valid value. Check range for NUMBER parameters.
Try doing the insert from sqlplus and see what happens.
|
|
|
Re: Key next item [message #521172 is a reply to message #521124] |
Fri, 26 August 2011 13:10 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
Why not give us proper setup information like the table columns with datatypes? It think it is much easier to do a decscribe and cut and paste than to type it out in an unformatted manner, which is ripe for error.
A and B are number, so you do not concatenate numbers to strings.
A and B are just variables holding form fields, so why not use the form field instead of having to load them into variables?
|
|
|
Re: Key next item [message #521217 is a reply to message #521172] |
Fri, 26 August 2011 22:21 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
shahzad-ul-hasan
Messages: 643 Registered: August 2002
|
Senior Member |
|
|
Dear
pls find the full table structure:
Table Name: info: Coloumn Data
id number 11001
Name Varchar2(200) Moni
Cell Number(17) 923216644029
Cell1 Number(17) 923336701973
-----------------------------------------------------------------
I have tried that also.
DECLARE
BEGIN
insert into out (receiver,msg,id,status)
values
('+'||:cell,'Respected Parents! Your Child has been given admission in ICON College Chiniot.
ICON shall produce better result than your expectations INSHALLAH...be an ICON',:info.id,'send');
insert into out (receiver,msg,id,status)
values
('+'||:cell1,'Respected Parents! Your Child has been given admission in ICON College Chiniot.ICON shall produce better result than your expectations INSHALLAH...be an ICON',:info.id,'send');
COMMIT;
NEXT_BLOCK;
END;
-------------------------------------------------------
but when i press enter(ref Key_next_item) it will return error:
FRM-40735: KEY_NEXT_ITEM RAISED UNHANLEDED EXCEPTION ERROR
pls advised.
|
|
|
|
|
Re: Key next item [message #521232 is a reply to message #521231] |
Sat, 27 August 2011 02:03 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
shahzad-ul-hasan
Messages: 643 Registered: August 2002
|
Senior Member |
|
|
insert into ozekimessageout(receiver,msg,id,status)
values
('+'||923326618402,'Respected Parents! Your Child has been given admission in ICON College Chin
ICON shall produce better result than your expectations INSHALLAH...be an ICON',11001,'send');
this query works in SQL*Plus
|
|
|
|
|
|
|
|
|