Home » SQL & PL/SQL » SQL & PL/SQL » log error feature in 10g
log error feature in 10g [message #229352] Fri, 06 April 2007 22:03 Go to next message
elduro
Messages: 2
Registered: April 2007
Junior Member
is it possible to use oracle log error feature with multitable insert?
im getting an error message
ORA-06550: line 37, column 1:
PL/SQL: ORA-00933: SQL command not properly ended
ORA-06550: line 37, column 1:
PL/SQL: SQL Statement ignored

for example

begin
INSERT ALL
WHEN (firstname IS NOT NULL AND lastname IS NOT NULL AND id IS NOT NULL) THEN
into temp1(firstname,lastname,id) VALUES(firstname,lastname,id)
WHEN (firstname IS NULL OR lastname IS NULL OR id IS NULL) THEN
INTO temp2(firstname,lastname,id) VALUES(firstname,lastname,id)
SELECT firstname,
CASE WHEN mount in (2,8,9,10) THEN lastname ELSE NULL END lastname,
CASE WHEN product_id = 4 THEN id ELSE NULL END id
FROM table1
WHEN UPPER(cat_code) <> 'GENERAL '
AND type_id <> 10
AND ind = 'Y'
LOG ERRORS INTO err$_temp('insert') REJECT LIMIT UNLIMITED ;
end;
Re: log error feature in 10g [message #229353 is a reply to message #229352] Fri, 06 April 2007 22:52 Go to previous messageGo to next message
BlackSwan
Messages: 25039
Registered: January 2009
Location: SoCal
Senior Member
I'm not sure why correcting syntax error requires a SQL Expert.
The lack of use of code tags make deciphering the SQL a challenge partly because I have no idea where line 37 might be.
I could be mistaken but the problem area might be
WHEN UPPER(cat_code) <> 'GENERAL '

[Updated on: Fri, 06 April 2007 22:57] by Moderator

Report message to a moderator

Re: log error feature in 10g [message #229357 is a reply to message #229352] Fri, 06 April 2007 23:08 Go to previous messageGo to next message
elduro
Messages: 2
Registered: April 2007
Junior Member
i don't think this has to do with syntax error. the question is if log error feature of 10g can be use with multitable insert. the reason im getting an error is because probably it is not supported.
Re: log error feature in 10g [message #229359 is a reply to message #229352] Fri, 06 April 2007 23:16 Go to previous message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
After checking INSERT syntax and goingh through some examples in documentation, it is very easy to discover, the SELECT statement has to be at the end of the command.

After second glance it seems, error logging is not supported in conditional insert clause.

[Edit: added second paragraph]

[Updated on: Fri, 06 April 2007 23:22]

Report message to a moderator

Previous Topic: next and pervious date
Next Topic: Search for value withing hierarchy paths
Goto Forum:
  


Current Time: Mon Dec 05 21:25:37 CST 2016

Total time taken to generate the page: 0.05428 seconds