Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error Handling: Insert into ... Select SQLERRM

818365Apr 19 2011 — edited Jul 25 2011
Hi

I'm working on an error handling for my import.
Therefore I would like to log invalid stuff in a table.

This works fine so far
insert into MyErrorTable (Clm1, Clm2, Clm3, ..., Clm20, Clm_WhatHappened)
select (Clm1, Clm2, Clm3, ..., Clm20, 'nonsence_static_Text'
from MySourceTable;
Now I would like to insert the SQLERRM
insert into MyErrorTable (Clm1, Clm2, Clm3, ..., Clm20, Clm_WhatHappened)
select (Clm1, Clm2, Clm3, ..., Clm20, SQLERRM
from MySourceTable;
But I get
"PL/SQL: ORA-00904: "SQLERRM": invalid identifier"


Did I understand somethong wrong with the insert-command?
Is it necessary to create one gigantic varchar-string?

Thank you for reading!

pAT

Edited by: pAT on Apr 19, 2011 5:35 AM
This post has been answered by Solomon Yakobson on Apr 19 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 17 2011
Added on Apr 19 2011
5 comments
6,116 views