Column not allowed here [message #276483] |
Thu, 25 October 2007 04:56 |
khresmoi
Messages: 24 Registered: October 2007
|
Junior Member |
|
|
I'm trying to insert a record into a table inside a cursor loop.
FOR REC IN CUR_MAST2
INSERT INTO xyz (a,s,d,f,POST_DATE,c_NAME,INSTANCE_NAME)
VALUES (SEQ_S_ID.NEXT_VAL,'AS','TAB'||lv_partition_name,
'DRP'||lv_partition_name,SYSDATE,REC.T_NAME,lv_UI_name);
'DRP'||lv_partition_name,SYSDATE,REC.T_NAME,lv_UI_name);
*
ERROR at line 3:
ORA-00984: column not allowed here
if i hardcode value for lv_UI_name, i get the same error with '*' under REC.T_NAME. But as far as i've seen and read, i CAN use a variable or a value from cursor-fetched record here.
Help!!
TIA..
|
|
|
Re: Column not allowed here [message #276486 is a reply to message #276483] |
Thu, 25 October 2007 05:03 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
Hi
can you post your actual code, as the above code would give you a different error. Also encase the code in code tags ( [code] [/code] to preserve formatting.
|
|
|
Re: Column not allowed here [message #276500 is a reply to message #276483] |
Thu, 25 October 2007 06:05 |
khresmoi
Messages: 24 Registered: October 2007
|
Junior Member |
|
|
the entire code is too big to post.
That is the line which gives out the error and the same error.. in the VALUES clause, wherever i'm using a variable, i get this error.
|
|
|
|
Re: Column not allowed here [message #276544 is a reply to message #276483] |
Thu, 25 October 2007 08:13 |
khresmoi
Messages: 24 Registered: October 2007
|
Junior Member |
|
|
didn't quite get ur Q....
Anyway, i absolutely need to use the cursor due to the design of the main program.
this particular error - ORA-00984: column not allowed here - is generlly encountered when u use column names in the VALUES clause. but in my peice of code i'm not using any column names.
i'm looking for the other probable causes of error. or any pointers as to why this error was encountered.
|
|
|
|
|
|