How to ignore error and continue with next value in PL/SQL FOR loop?
hi,
When the DROP INDEX statement fails it have to continue with the next value in FOR loop without exiting from the loop. Can anyone tell me how to do this?
DECLARE
CURSOR aud_cur IS
SELECT key_col_idx FROM audience_work where aud_ref_id between 106 and 109;
BEGIN
FOR aud_row IN aud_cur LOOP
EXECUTE IMMEDIATE
'DROP INDEX ' || aud_row.key_col_idx;
END LOOP;
END;
Thanks,
Noble
DECLARE
CURSOR aud_cur
IS
SELECT key_col_idx FROM audience_work where aud_ref_id between 106 and 109;
BEGIN
FOR aud_row IN aud_cur LOOP
begin
EXECUTE IMMEDIATE 'DROP INDEX ' || aud_row.key_col_idx;
exception
when others then
if sqlcode = -01418 then
dbms_output.put_line(' index does not exist ');
else
dbms_output.put_line(sqlcode);
raise;
end if;
end;
END LOOP;
END;
/
Similar Messages
-
All my purchased song from iTunes are not playing complete (iPod and computer with Windows Vista), unexpectedly stops and continues with next song. What am I doing wrong?
Are the songs playing whole in iTunes? if not download them again.
else read this Apple Support Article on your problem
Have a nice day! -
Place Call and continue with remaining script steps - is it possible?
We recently picked up IPCelerate which has the ability to send a Text display or Text-to-Speech message to a group of phones simply by dialing a configured directory number. We would like to text our call center agents with this application when a caller has been waiting for X number of loops.
Attempting to use 'Place Call' to initiate this text page works, however, the script terminates immediately after the call is placed and we would like to continue on with the remainder of our script. In this case, on Success go back to the top of the loop.
I have also tried to use Call Subflow instead, thinking an executed sub-routine placing the call would return to the original script and continue on, but it didn't. In both cases, the system comes back and states " I'm sorry, we're currently experiencing system problems and are unable to process your call. Please try again later."
If there's a way to get this to work via Place Call or another process to accomplish the same result, that would be fantastic. I appreciate any feedback.
We're using UCCx Express 5.0 (2.064) with premium type licensing.Hello,
I did get to an answer similar to what r.stockton did to solve the issue, but I left Exception (ContactInactiveException) Goto in ours to isolate exceptions because we have multiple contacts within our script. Turns out that this particular exception was thrown by the PlaceCall step ending abruptly by our paging system answering and hanging up the call quickly. MIVR logs showed that it didn't bomb as immediately as when the debugs showed it crashing - it actually went into a loop over and over with the Trigger contact before failing.
We had some help from TAC on this, but below is what we did to keep some error checking and notification we use available to us. We are running a check to make sure the Call Trigger (original call) is still active.
placecallContact = Place Call (to Number)
on Exception (ContactInactiveException) Goto
label:
CallActive = Get Contact Info (--Trigering Contact--, Active)
If (CallActive) Then
- True branch continues with script
- False Branch terminates call
If this takes the false branch, it means the trigger contact is not active, and has abandoned the call or been transferred elsewhere. Placed an End step here to prevent any loops.
If this takes the true branch, it means the triggering contact is actually still active. In our scenario, CallActive (boolean variable) is verified true and continues with the script without going into the loop of death.
I hope this helps! -
How to catch date errors and continue processing in a PL/SQL procedure
I'm updating a date field with dates constructed from day, month and year fields. The incoming data has many instances of day and month that are not valid dates, ex 11 31 2007. There is no 31st day in November.
I would like to write a pl/sql script to scan the table containing these values and log the rows that produce conversion errors.
I thought I could do this with exceptions but there are no exceptions that correspond to the ORA-01847 error for mismatched day and month.
Here is what I tried (the print procedure is a local wrapper for DBMS_OUTPUT.put_line):
PROCEDURE date_check IS
start1 DATE ;
BEGIN
select to_date(nvl(yearcollected,'9999') ||'/'|| nvl(monthcollected,'01') ||'/'|| nvl(daycollected,'01'),'YYYY/MM/DD'))) into start1 from incoming_data where id=1 ;
BEGIN
update temp_test set test_date = start1 where id=1 ;
EXCEPTION
WHEN OTHERS THEN
print('Date error message from exception block');
END;
print('Processing continues after handling date exception') ;
END date_check ;
Is there a way to catch this kind of error and continue processing after logging a message?
-=beekyHi, Beeky,
There are lots of different error messages associated with bad dates. Rather than try to catch them all, I use a BEGIN ... EXCEPTION block that contains nothing but a TO_DATE call. This is one of the rare occassions when I think "EXCEPTION WHEN OTHERS" is okay,
The following function comes from a package. If you want to make a stand-alone function, remember to say " *CREATE OR REPLACE* FUNCTION ...".
-- ** t o _ d t **
-- to_dt attempts to convert in_txt (assumed to
-- be in the format of in_fmt_txt) to a DATE.
-- If the conversion works, to_dt returns the DATE.
-- If the conversion fails for any reason, to_dt returns in_err_dt.
FUNCTION to_dt
( in_txt IN VARCHAR2 -- to be converted
, in_fmt_txt IN VARCHAR2 DEFAULT 'DD-MON-YYYY' -- optional format
, in_err_dt IN DATE DEFAULT NULL
RETURN DATE
DETERMINISTIC
AS
BEGIN
-- Try to convert in_txt to a DATE. If it works, fine.
RETURN TO_DATE (in_txt, in_fmt_txt);
EXCEPTION -- If TO_DATE caused an error, then this is not a valid DATE: return in_err_dt
WHEN OTHERS
THEN
RETURN in_err_dt;
END to_dt
; -
I'm having problems with 8.1 and Continuity / Handoff. It will work fine for web pages, etc. but in email when I try to do it between by iPhone 5s running 8.1 and my Macbook Pro running Yosemite I consistently get an error. "Failed to Continue Activity" Cocoa Error 4609. Handoff is working for phone calls and text messages. By email just crashes each time. It was also doing it under 8.0.2. My iPhone and iPad handle this fine. It's only the MacBook to the iPhone that fails, and only on email.
Handoff Continuity Troubleshooting
-
OWB mappings to skip rows that are in error and continue processing
OWB mappings to skip rows that are in error and continue processing.
1) Enter a record into an error log
2) Skip rows that are in error
3) and continue processing
Type of information could be needed in the error log:
SY_LOG_ERROR_KEY
ERROR_TIMESTAMP
MAP_NAME
SOURCE_RECORD
ERROR_CODE
ERROR_MESSAGE
ERROR_NOTES
Example:
If the source table has five records, in that 3 records has some error.
When I run the OWB mapping to load the source data to target table, OWB should skip the 3 record and load all the remaining record. This is our requirement.
Another think I want to store the error record details in a error log table.
Can u plz tell me whether it is possible in OWB. If not means please give some suggestion to do this.Hi,
thanks for ur help, As is OWB version is 10.2.0 so for set based it is not working. with your idea i create a POST PROCESSING MAPPING. it is now working fine.
Step 1:
Create a table MAP_ERROR_LOG.
Script:
CREATE TABLE MAP_ERROR_LOG
ERROR_SEQ NUMBER,
MAPPING_NAME VARCHAR2(32 BYTE),
TARGET_TABLE VARCHAR2(35 BYTE),
TARGET_COLUMN VARCHAR2(35 BYTE),
TARGET_VALUE VARCHAR2(100 BYTE),
PRIMARY_TABLE VARCHAR2(100 BYTE),
ERROR_ROWKEY NUMBER,
ERROR_CODE VARCHAR2(12 BYTE),
ERROR_MESSAGE VARCHAR2(2000 BYTE),
ERROR_TIMESTAMP DATE
TABLESPACE ODS_D1_AA
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 80K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
Step 2:
Create a sequence MAP_ERROR_LOG_SEQ
CREATE SEQUENCE MAP_ERROR_LOG_SEQ START WITH 1 INCREMENT BY 1
Step 3:
Create a procedure PROC_MAP_ERROR_LOG through OWB.
In this i have used 3 cursor, first cursor is used to check the count of error messages for the corresponding table(WB_RT_ERROR_SOURCES).
The second cursor is used to get the oracle error and the primary key values.
The third cursor is used for get the ORACLE DBA errors such as "UNABLE TO EXTEND THE TABLESPACE" for this type errors.
CREATE OR REPLACE PROCEDURE PROC_MAP_ERROR_LOG(MAP_ID VARCHAR2) IS
--initialize variables here
CURSOR C1 IS
SELECT COUNT(RTA_IID) FROM OWBREPO.WB_RT_ERROR_SOURCES
WHERE RTA_IID =( SELECT MAX(RTA_IID) FROM OWBREPO.WB_RT_AUDIT WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
V_COUNT NUMBER;
CURSOR C2 IS
SELECT A.RTE_ROWKEY ERR_ROWKEY,SUBSTR(A.RTE_SQLERRM,1,INSTR(A.RTE_SQLERRM,':')-1) ERROR_CODE,
SUBSTR(A.RTE_SQLERRM,INSTR(A.RTE_SQLERRM,':')+1) ERROR_MESSAGE,
C.RTA_LOB_NAME MAPPING_NAME,SUBSTR(B.RTS_SOURCE_COLUMN,(INSTR(B.RTS_SOURCE_COLUMN,'.')+1)) TARGET_COLUMN,
B.RTS_VALUE TARGET_VALUE,C.RTA_PRIMARY_SOURCE PRIMARY_SOURCE,C.RTA_PRIMARY_TARGET TARGET_TABLE,
C.RTA_DATE ERROR_TIMESTAMP
FROM OWBREPO.WB_RT_ERRORS A,OWBREPO.WB_RT_ERROR_SOURCES B, OWBREPO.WB_RT_AUDIT C
WHERE C.RTA_IID = A.RTA_IID
AND C.RTA_IID = B.RTA_IID
AND A.RTA_IID = B.RTA_IID
AND A.RTE_ROWKEY =B.RTE_ROWKEY
--AND RTS_SEQ =1
AND B.RTS_SEQ IN (SELECT POSITION FROM ALL_CONS_COLUMNS A,ALL_CONSTRAINTS B
WHERE A.TABLE_NAME = B.TABLE_NAME
AND A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
AND A.TABLE_NAME =MAP_ID
AND CONSTRAINT_TYPE ='P')
AND A.RTA_IID =(
SELECT MAX(RTA_IID) FROM OWBREPO.WB_RT_AUDIT WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
CURSOR C3 IS
SELECT A.RTE_ROWKEY ERR_ROWKEY,SUBSTR(A.RTE_SQLERRM,1,INSTR(A.RTE_SQLERRM,':')-1) ERROR_CODE,
SUBSTR(A.RTE_SQLERRM,INSTR(A.RTE_SQLERRM,':')+1) ERROR_MESSAGE,
C.RTA_LOB_NAME MAPPING_NAME,SUBSTR(B.RTS_SOURCE_COLUMN,(INSTR(B.RTS_SOURCE_COLUMN,'.')+1)) TARGET_COLUMN,
B.RTS_VALUE TARGET_VALUE,C.RTA_PRIMARY_SOURCE PRIMARY_SOURCE,C.RTA_PRIMARY_TARGET TARGET_TABLE,
C.RTA_DATE ERROR_TIMESTAMP
FROM OWBREPO.WB_RT_ERRORS A,OWBREPO.WB_RT_ERROR_SOURCES B, OWBREPO.WB_RT_AUDIT C
WHERE C.RTA_IID = A.RTA_IID
AND A.RTA_IID = B.RTA_IID (+)
AND A.RTE_ROWKEY =B.RTE_ROWKEY (+)
AND A.RTA_IID =(
SELECT MAX(RTA_IID) FROM OWBREPO.WB_RT_AUDIT WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
-- main body
BEGIN
DELETE ED_ODS.MAP_ERROR_LOG WHERE TARGET_TABLE ='"'||MAP_ID||'"';
COMMIT;
OPEN C1;
FETCH C1 INTO V_COUNT;
IF V_COUNT >0 THEN
FOR REC IN C2
LOOP
INSERT INTO ED_ODS.MAP_ERROR_LOG
(Error_seq ,
Mapping_name,
Target_table,
Target_column ,
Target_value ,
Primary_table ,
Error_rowkey ,
Error_code ,
Error_message ,
Error_timestamp)
VALUES(
ED_ODS.MAP_ERROR_LOG_SEQ.NEXTVAL,
REC.MAPPING_NAME,
REC.TARGET_TABLE,
REC.TARGET_COLUMN,
REC.TARGET_VALUE,
REC.PRIMARY_SOURCE,
REC.ERR_ROWKEY,
REC.ERROR_CODE,
REC.ERROR_MESSAGE,
REC.ERROR_TIMESTAMP);
END LOOP;
ELSE
FOR REC IN C3
LOOP
INSERT INTO ED_ODS.MAP_ERROR_LOG
(Error_seq ,
Mapping_name,
Target_table,
Target_column ,
Target_value ,
Primary_table ,
Error_rowkey ,
Error_code ,
Error_message ,
Error_timestamp)
VALUES(
ED_ODS.MAP_ERROR_LOG_SEQ.NEXTVAL,
REC.MAPPING_NAME,
REC.TARGET_TABLE,
REC.TARGET_COLUMN,
REC.TARGET_VALUE,
REC.PRIMARY_SOURCE,
REC.ERR_ROWKEY,
REC.ERROR_CODE,
REC.ERROR_MESSAGE,
REC.ERROR_TIMESTAMP);
END LOOP;
END IF;
CLOSE C1;
COMMIT;
-- NULL; -- allow compilation
EXCEPTION
WHEN OTHERS THEN
NULL; -- enter any exception code here
END; -
I have iTunes on my Dell Vista 64 bit and while trying to burn a book to cd it keeps telling me to insert a blank cd when I have done that already. What do I need to do to get it to recognize a blank cd and continue with the burn?
Microsoft Windows 8 x64 Home Premium Edition (Build 9200)
Dell Inc. Inspiron 5721
iTunes 11.1.3.8
QuickTime not available
FairPlay 2.5.16
Apple Application Support 2.3.6
iPod Updater Library 11.1f5
CD Driver 2.2.3.0
CD Driver DLL 2.1.3.1
Apple Mobile Device 7.0.0.117
Apple Mobile Device Driver 1.64.0.0
Bonjour 3.0.0.10 (333.10)
Gracenote SDK 1.9.6.502
Gracenote MusicID 1.9.6.115
Gracenote Submit 1.9.6.143
Gracenote DSP 1.9.6.45
iTunes Serial Number 002FB7200B6E2500
Current user is not an administrator.
The current local date and time is 2014-01-01 16:14:14.
iTunes is not running in safe mode.
WebKit accelerated compositing is enabled.
HDCP is supported.
Core Media is supported.
**** External Plug-ins Information ****
No external plug-ins installed.
iPodService 11.1.3.8 (x64) is currently running.
iTunesHelper 11.1.3.8 is currently running.
Apple Mobile Device service 3.3.0.0 is currently running.
**** CD/DVD Drive Tests ****
No drivers in LowerFilters.
UpperFilters: GEARAspiWDM (2.2.3.0),
D: PLDS DVD+/-RW DU, Rev
Audio CD in drive.
Found 15 songs on CD, playing time 55:35 on Audio CD.
Track 1, start time 00:02:00
Track 2, start time 03:13:47
Track 3, start time 07:40:44
Track 4, start time 11:32:54
Track 5, start time 14:33:34
Track 6, start time 18:24:06
Track 7, start time 22:00:28
Track 8, start time 25:36:27
Track 9, start time 28:47:47
Track 10, start time 32:56:24
Track 11, start time 37:07:54
Track 12, start time 40:11:29
Track 13, start time 45:02:62
Track 14, start time 48:42:65
Track 15, start time 51:56:11
Audio CD reading succeeded.
Get drive speed succeeded.
The drive CDR speeds are: 24.
The drive CDRW speeds are: 24.
The drive DVDR speeds are: 24.
The drive DVDRW speeds are: 24.
The last failed audio CD burn had error code 4310(0x000010d6). It happened on drive D: PLDS DVD+/-RW DU on CDR media at speed 24X. -
How to get gui_download and gui_upload with popup filename?
how to get gui_download and gui_upload with popup filename?
Here is a short example.
report zrich_0003 .
data: ifiletab type filetable.
data: xfiletab like line of ifiletab.
data: xstring type string.
data: rc type i.
data: itab type table of string.
data: xtab type string.
start-of-selection.
call method cl_gui_frontend_services=>file_open_dialog
changing
file_table = ifiletab
rc = rc.
read table ifiletab into xfiletab index 1.
xstring = xfiletab-filename.
check not xstring is initial.
call method cl_gui_frontend_services=>gui_upload
exporting
filename = xstring
changing
data_tab = itab.
loop at itab into xtab.
write:/ xtab.
endloop.
Regards,
Rich Heilman -
How to create database and table with GUI?
How to create database and table with GUI?
for linux can do that?
or have only way to create table by use sql*plus.
everyone please help me.
thanksgo to www.orasoft.org
here is a gui tool.
null -
How to pass username and password with the portal url
i want to access portal from my web site. i have created username and password fields in my web page. when submited , my portal page should open. so how to pass username and password with the portal url.
This is not straightforward; but it is doable.
First tell us about your portal version; portal 10.1.4 has a slightly different method of doing it and the pre-10g portals were completely different animals.
And if you are in AS Rel 2, then the most important document for you would probably be the following:
[Creating Deployment Specific Pages| http://download-west.oracle.com/docs/cd/B14099_19/idmanage.1012/b14078/custom.htm#i1015535]
You might want to use it in conjunction with some metalink notes about your portal version and such a login page.
hope that helps!
AMN -
How can I authenticate and authorize with Web Service on ESB ?
Hello,
I want to authenticate and authorize client with Web Service published
by HTTP/SOAP BC.
Simply if it is an Web Service as J2EE application, I will use
Basic Authentication with JAX-RPC and Realm.
But I think that Web Service published by HTTP/SOAP BC is not belong
to J2EE Application. Threre is no place to describe security role mapping
(like web.xml).
JBI 1.0 the section "5.5.1.1.3 Normalized Message Properties" comments
JAAS Subject is given in the NM Properties. Really in this package
com.sun.jbi.internal.security.*
implements JAAS autentication and authorization (at JaasAuthenticator).
But I can't see how to configure my Service to use this.
How can I authenticate and authorize with Web Service on ESB ?
I referred to the resources.
Mutual Authentication for Web Services: A Live Example
http://developers.sun.com/prodtech/appserver/reference/techart/mutual_auth.html
XML and Web Services Security
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security7.html
JAAS Authentication Tutorial
http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnOnly.html
Thanks,
Takurou
- environment ---------------------------------------------
OpenESB : Project Open ESB Starter Kit
AppServer : Sun Java Systems Application Server 9.0 PE
OS : Windows XP
I don't assume to use SSL (if It's necessary I will try).
User information is stored in a LDAP Server.
-----------------------------------------------------------Hello,
I read this resource.
SecurityDesign
http://www.glassfishwiki.org/jbiwiki/Wiki.jsp?page=SecurityDesign
Then I think [non-ssl and ssl/tls and so on] securing by basic authentication is ongoing feature at this time.
But I can't see well why this page comments 'HTTP over SSL, TLS'.
HTTP/SOAP Binding Component Overview
http://download.java.net/general/open-esb/docs/jbi-components/httpsoap-bc.html
Does BC support only "SSL server authentication" ?
Doesn't BC support "SSL client authentication" by username/password ?
Thanks,
Takurou -
Anyone knows how to export ROLES and SYNONYMS with exp command?
Anyone knows how to export ROLES and SYNONYMS with exp/imp commands?
Help is needed. Thanks.Hi,
Pls. post this query in RDBMS forum since Portal export import forum does not handle this.
Thanks,
~Kirit. -
I have installed the new io 7.0, and when it is on the way to configure all functions, after the ICloud, when terms and conditions confirmation apperas, it is stucked
Reset iPad and continue with update.
Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
Note: Data will not be affected. -
How to use audio and mic with multipoint server with out it crashing on you
how to use audio and mic with multipoint server with out it crashing on you when i use them to make calls thru my station (zero client) at the same time it crashes on me and i need to restart the multipoint is there a setting i may have mist that enable's
them to work at the same time and if posible can i use a non USB deviceLook for "Single Sign-on Using Kerberos in Java" in google or on Sun's web site. Maybe this paper will help you.
Claude -
Hi All.
How to end/terminate and assignment with end dated entered by user Apps R12.1?
when i try to end or terminate and assignemnt the sysdate is begin registered for effective_end date.
any help is reaaly greatly appriciated
thanks and regards
SoniHi Soni,
What is the end date you want to enter as. Are you talking about 31-Dec-4712. If not, please change the sytem effective date (calendar icon on the oracle menu) to the date you want to terminate and follow the termination process.
Thanks,
Avinash
Maybe you are looking for
-
Creative Zen Aurvana headphones
Wow, creative has the WORST customer support on earth, the website is circular, and you can't get anywhere with it. So I have the Creative Zen Aurvana headphones, used them for 3-4 months and one side doesn't work anymore, they were mildly used, and
-
Windows Vista and Itunes 7.1
so, 7.1 was supposed to be the cure all for the windows vista problem, well...i was using the earlier version w/the patch for vista and life was grand...i upgraded to 7.1 yesterday and now every time i launch itunes the program freezes and eventually
-
Why and how to use events in abap objects
Dear all, Please explain me why and how to use events in abap objects with real time example regards pankaj giri
-
Upgrade 4.7 to ECC 6.0 : Batch input
Hello, We have an upgrade project from R3 4.7 to ECC 6.0. I'm looking for information regarding SAP technical advise for interfaces, data update, data creation. We use batch input. Does this technic still available in ECC 6.0 ? Should we use Idoc, BA
-
What is the size limit for converting a pdf to a word document?
My file won't convert. It gives me an error.