Can i use execption in forall like below proc

CREATE TABLE X_TEST1 (X_NO VARCHAR2(8), X_SAL NUMBER,X_NAME VARCHAR2(10) );
CREATE TABLE X_TEST2 (X_NO NUMBER, X_SAL NUMBER,X_NAME VARCHAR2(10) );
CREATE TABLE X_TEST3 (X_NO VARCHAR2(8), X_SAL NUMBER,X_NAME VARCHAR2(10) );
INSERT INTO X_TEST1 VALUES
(1 , 5000 , 'LENA' ); IF NUMBER COME INSERT RECORD IN --X_TEST2
(2 , 8000, 'MINA' );
(6 , 9000, 'HINA' );
(XX , 5000, 'LENA' ); IF VARCHAR2 COME INSERT RECORD IN --X_TEST2
(ZZ , 7000, 'MINA' );
(MM , 1200, 'HINA' ); --SO CAN I POSSIBLE BELOW QUERY WITH FORALL....SQL%BULK_EXCEPTION..
DECLARE
TYPE EMP_TAB_TYPE IS TABLE OF X_TEST1%ROWTYPE;
EMP_TAB EMP_TAB_TYPE;
BEGIN
SELECT * BULK COLLECT INTO EMP_TAB FROM X_TEST1;
FOR i IN EMP_TAB.FIRST..EMP_TAB.LAST LOOP
BEGIN
INSERT INTO X_TEST2 (X_NO,X_SAL,X_NAME) if number goes int x_test2
VALUES (EMP_TAB(i).X_NO,EMP_TAB(i).X_SAL,EMP_TAB(i).X_NAME);
EXCEPTION
WHEN OTHERS THEN
INSERT INTO X_TEST3 (X_NO,X_SAL,X_NAME) if number goes int x_test3
VALUES (EMP_TAB(i).X_NO,EMP_TAB(i).X_SAL,EMP_TAB(i).X_NAME);
END;
END LOOP;
END;

user11960282 wrote:
CREATE TABLE X_TEST1 (X_NO VARCHAR2(8), X_SAL NUMBER,X_NAME VARCHAR2(10) );
CREATE TABLE X_TEST2 (X_NO NUMBER, X_SAL NUMBER,X_NAME VARCHAR2(10) );
CREATE TABLE X_TEST3 (X_NO VARCHAR2(8), X_SAL NUMBER,X_NAME VARCHAR2(10) );
INSERT INTO X_TEST1 VALUES
(1 , 5000 , 'LENA' ); IF NUMBER COME INSERT RECORD IN --X_TEST2
(2 , 8000, 'MINA' );
(6 , 9000, 'HINA' );
(XX , 5000, 'LENA' ); IF VARCHAR2 COME INSERT RECORD IN --X_TEST2
(ZZ , 7000, 'MINA' );
(MM , 1200, 'HINA' ); --SO CAN I POSSIBLE BELOW QUERY WITH FORALL....SQL%BULK_EXCEPTION..
DECLARE
TYPE EMP_TAB_TYPE IS TABLE OF X_TEST1%ROWTYPE;
EMP_TAB EMP_TAB_TYPE;
BEGIN
SELECT * BULK COLLECT INTO EMP_TAB FROM X_TEST1;
FOR i IN EMP_TAB.FIRST..EMP_TAB.LAST LOOP
BEGIN
INSERT INTO X_TEST2 (X_NO,X_SAL,X_NAME) if number goes int x_test2
VALUES (EMP_TAB(i).X_NO,EMP_TAB(i).X_SAL,EMP_TAB(i).X_NAME);
EXCEPTION
WHEN OTHERS THEN
INSERT INTO X_TEST3 (X_NO,X_SAL,X_NAME) if number goes int x_test3
VALUES (EMP_TAB(i).X_NO,EMP_TAB(i).X_SAL,EMP_TAB(i).X_NAME);
END;
END LOOP;
END;Hi,
Here is one way..
Write a function which determines whether the input is number or character. Based on this insert into the respective table
CREATE OR REPLACE FUNCTION TEST_IS_FNC(p_in IN varchar2)
RETURN varchar2
IS
l_output varchar2(4000);
BEGIN
l_output:=to_number(p_in);
RETURN 'TRUE';
EXCEPTION WHEN OTHERS THEN
RETURN 'FALSE';
END TEST_IS_FNC;To test:
SQL> select TEST_IS_FNC('1A') from dual;
TEST_IS_FNC('1A')
FALSE
SQL> select TEST_IS_FNC(1) from dual;
TEST_IS_FNC(1)
TRUE
SQL>
SQL> DECLARE
  2  l_x_no varchar2(4000):='1A';
  3  l_output varchar2(4000);
  4  BEGIN
  5  l_output:=TEST_IS_FNC(l_x_no);
  6  IF (l_output='TRUE') THEN
  7  INSERT INTO X_TEST1(X_NO) VALUES(l_x_no);
  8  ELSE
  9  INSERT INTO X_TEST2(X_NO) VALUES(l_x_no);
10  END IF;
11  END;
12  .
SQL> /
PL/SQL procedure successfully completed.
SQL> select * from X_TEST2;
X_NO          X_SAL X_NAME
1A
SQL> DECLARE
  2  l_x_no varchar2(4000):=1;
  3  l_output varchar2(4000);
  4  BEGIN
  5  l_output:=TEST_IS_FNC(l_x_no);
  6  IF (l_output='TRUE') THEN
  7  INSERT INTO X_TEST1(X_NO) VALUES(l_x_no);
  8  ELSE
  9  INSERT INTO X_TEST2(X_NO) VALUES(l_x_no);
10  END IF;
11  END;
12  .
SQL> /
PL/SQL procedure successfully completed.
SQL> select * from X_TEST1;
X_NO          X_SAL X_NAME
1Regards,
Achyut Kotekal
Edited by: Achyut K on Jun 6, 2013 3:25 AM

Similar Messages

  • How can I use my Zen Xtra like a flash memory

    Hello, I want to know how can I use my MP3 player like a flash memory.
    I have one and if I conect it with other computers I can't transfer documents and with a flash memory I conect it in all the computers with Windows XP and all of they detect the flash memory and they can transfer documents.
    With my Zen Xtra I connect it and the computer detects it but I can't transfer anything because the computer doesn't have the software.
    My question is.. Do I have to install the software in all the computers that I use ? or there are other forms to conects PC and MP3 Player? ( I want to transfer documents like text, image, etc)

    But some MP3 players do that, why this one can't be connected with all the computers ?
    Message Edited by morfo on 0-22-2005 05:54 PM

  • Can I use the IPad mini like a cell phone

    Can I use the IPad mini like a cell phone

    I use Viber Out to call Land Lines and Mobile

  • Can I use my Ipod nano like a external disk. like a flas unit?

    I´m gonna buy an Ipod, and I don´t know if I can use the Ipod nano like an external disk in my computer to storage files and download them in other computer. If nano doesn´t do that, the Ipod does or either.
    Thanks

    Using your iPod as a hard disk
    Regards
    Colin R.

  • Can i used an iphone 4 like a ipod touch without a sim card?

    I just got a iphone 4 but it doesn't have a sim card can i use it like that like a ipod please help!

    You'll need a SIM card to activate it, but after that, you can remove the SIM card.
    support.apple.com/kb/ht3406

  • Can we use if/else condtions like

    can we use if [condtion1]
    then [condition2]
    elseif [condtion3]
    then [conditon4]
    in oracle.

    Nested Case could help you:
    Select *
    from
           <table_name>
    where
          <col1> =
          (case when <condition_1> then
                                   (case when <condition_2> then <result_2>
                                         when <condition_3> then <result_3> end)
           else <some_other_result> end);

  • Variable selection issue can we use variable exit for the below problem

    Hi experts,
    i have query in which i have an infoobject which is a characterstic i have even set the sort property for that infoobject but when the variable screen comes up and when we go into the selection screen all the help values are not sorted in the way i have set them. for example
    ihave project managers like below
    A
    B
    C
    D
    E
    F
    G
    H
    instead of displaying in order above its displyaing in
    H
    A
    G
    C
    B
    D
    F
    How to set it right.
    thanks and regards
    Message was edited by:
            Neel Kamal

    Hi
    actually i have done the same thing its getting displayed in the bex analyzer but not in the protal.
    thanks and regards
    Message was edited by:
            Neel Kamal

  • Can I use the split screen like in Excel?

    Is it possible to use the split screen like I am used to using iin Excel?
    Jon

    jonles wrote:
    Thanks Jerry,
    This is the first strike against Numbers as compared to Excel.  Very nice feature for my use.
    Jon
    If you work at it you will find hundreds of strikes, compared to Excel. Heck, there are about fifty strikes just compared to the previous version of Numbers. You have to use the app that suits your style, or change your style.
    Jerry

  • In full screen mode how can i use keyboard shortcut just like

    recently i used adobe cs 5.1 version and some problem are there which problem was not in cs 3 and cs 4 in advance version why this problem kindly tell me the solve which may be i dont know
    my problem is, in photoshop  3 screen mode are there 1-standard screen mode, 2- full screen mode with menu bar  and 3- full screen mode
    in 3- full screen mode ---- in this view window how can i go to image-adjustments-brightness/contrast  through using only keyboard shortcuts just like ALT+I then A then C = brightness/contrast menu will come
             any body please solve my problem
         thank U very much

    Chris, he means the windows-only ALT+letters shortcuts, not brightness contrast in particular.
    RA, this is your third thread on the topic, please do not create multiple threads...
    http://forums.adobe.com/thread/957264
    and http://forums.adobe.com/thread/957168

  • Can I use the Podcast app like the older iOS 6 Music Player?

    I've updated to iOS 7 and iTunes 11.1 and found that things seem drastically different.
    How i used to do podcasts:
    Subscribe to a podcast in iTunes on my Mac
    Sync to iPhone using a cable
    What used to happen:
    Podcasts that were selected to sync did if there were unplayed episodes
    The Music player would list only those podcasts where there were unplayed episodes
    Now things have changed.  I immediately was told that none of my podcasts were playable without the Podcast app.  I downloaded it and installed it.
    What is happening now:
    Still subscribing to a podcast in iTunes on my Mac
    Sync to iPhone using a cable
    Podcasts showing unplayed in iTunes on my Mac = 46
    Podcasts showing unplayed in the Podcast app = 57 - the difference appears to be that the podcast app is showing non-downloaded podcasts
    Podcast app showing all podcasts whether or not there are any to play.  The list includes podcasts that are not supposed to sync to my phone.
    The Podcast listing appears to be in a random order (actual list shown)-
    Apple Keynotes (no episodes)
    This week in Photo (8 episodes)
    Jake and Amir (no episodes)
    Podcast Beyond (no episodes)
    Accidental Tech Podcast (no episodes)
    Vector (1 episode)
    Podcasts with no new episodes now show a new episode though it looks like the episode is not downloaded
    I'm not sure why what is being shown in iTunes is not being shown in the Podcast app.
    Is there anyway to get the old behavior using the Podcast app?

    Additional information.   Can this be right?
    I spoke to Apple support who said that the settings for podcast syncing in iTunes are no longer being used since Apple moved to their Podcast app. 
    This may explain why I see all 45 podcasts on my iphone when I only have 15 of them set to sync.
    She also said that I would need to manually sync listened/unlistened podcasts between my Mac and my mobile devices since podcasts were no longer being synced from iTunes.
    Can anyone verify?

  • I love my music, would love a iPod for this reason but the iPad air sounds really good too. Can i use the iPad air like a iPod for travel (in car).

    I love music when I travel, I still have a older mp3 player that I can plug in the car stereo. I listen to various artists, a variety of music. Love to make a big play list for a long road trip.
    I'm in the market for a Ipod touch or a ipad air, would I be able to do the same with the Ipod verses Ipad air.
    I would use the WiFi for connection. 
    Compare for me the differences.
    Remember i would want to use it when im out traveling on the road for music.

    The wifi-only iPad is basically large iPod touch. There are some aps that are for the iPad only.
    The new devices a a Lightning cable vice the older 30-pin connector.
    One of these adopters/cables may work:
    http://store.apple.com/us/product/MD824ZM/A/lightning-to-30-pin-adapter-02-m?fno de=45
    http://store.apple.com/us/product/MD823ZM/A/lightning-to-30-pin-adapter?fnode=45
    However. some car systems and devices are not compatible with the newer iOS devices like the iPad Air

  • Can Sky use the Freeview logo like that?

    Surprised this hasn't come up already.  Now that we have Sky Sports the first thing I noticed was that Sky have added an extra logo next to the Sky Sports 1/2 logo in the top right on the digital terrestrial transmission.  The logo is the same shape as the Freeview logo which suggests this is being done to ensure no pubs, etc are using the BT/TopUp version of Sky Sports as I believe BT/TopUp aren't allowed to sell to commercial premises.  Now, I thought Sky had already taken care of this with the 'pint glass' logo on the Pub versions of Sky Sports on digital satellite which means there shouldn't be any need for this extra logo which is permanently on, even during the commercials which of course could result in screen burn, etc.
    So, a few questions really:
    As the 'shape' is that of the Freeview logo, are they actually allowed to use it?
    Who asked for it to be there, BT or Sky?
    Can it be changed / removed / moved?
    Why does it need to be there at all?
    ---Remember to mark as 'solved' and give stars when you like a post---

    Additional information.   Can this be right?
    I spoke to Apple support who said that the settings for podcast syncing in iTunes are no longer being used since Apple moved to their Podcast app. 
    This may explain why I see all 45 podcasts on my iphone when I only have 15 of them set to sync.
    She also said that I would need to manually sync listened/unlistened podcasts between my Mac and my mobile devices since podcasts were no longer being synced from iTunes.
    Can anyone verify?

  • Can not use any remote desktop like VNC after installing Oracle Linux 6.3

    Hi
    I just installed OL 6.3 on a HP Proliant ML380 g7. Now I want to connect to the server using any Remote Desktop tools but I can not!
    I've activated system>pref>Remote Desktop
    But I can not access any of servers from:
    - a Mac using, Mac server sharing screen, VNC viewer or Microsoft Remote connection which is in a same subnet
    - Other Server Using KRDC, Remote Desktop Viewer, terminal server client or tiger VNC viewer
    Also I tried to connect to servers after activating krfb
    but it always says no rout to server/ server not found/ connection closed
    and remote desktop viewer can not find any host when I try to use option "find"
    Please Advise
    Thank you in advance

    Make sure to enable "require a password..." in the Remote Desktop Preference on the Linux system. Some clients won't work unless this is set. Unfortunately the Remote Desktop Preferences panel on the Linux side does not show you the port it is listening on, but you can get it by clicking on the IP or name that it shows as a link. The first user or vnc server is usually listening on port 5900, then 5901, and so on.
    Your problem is probably the firewall on your Linux system. You can disable the firewall on the Linux system:
    service iptables stop
    However, probably a better idea, simply tunnel the connection through SSH as following:
    On the Mac, open the Terminal application from the Applications/Utilities folder. Then type the following:
    <pre>
    ssh -L local_port:localhost:remote_port -N -f -l username server_address
    </pre>
    local_port = port on your Mac that does not conflict with any of your own screen-sharing or other services, e.g. 5555
    remote_port = vnc server port on your Linux system
    username = user for which you have enabled remote desktop sharing
    server_address = ip address or FQDN of your Linux system.
    For instance:
    <pre>
    ssh -L 5555:localhost:5900 -N -f -l root 10.0.1.2
    </pre>
    The trick is now to connect to a local port on your Mac, instead using the address of your Linux server. The communication will be encrypted using ssh going over tcp port 22, which is normally enabled in the firewall.
    The Mac screen sharing application is working fine. On your Mac, select "Go>Connect to Server" from the Finder menu and type:
    vnc://localhost:5555

  • Need a suggestion - Can I use Livecycle Output ES as below

    My company needs to generate documents on the fly and we are looking to find a solution where we can associate the data elements with the PDF template fields and at runtime we fill in application data to generate the documents.
    We don't need anything fancier that this but have following requirements :
    1> Our customers need to create PDF templates and the data bindings based on the XSD we provide to them -  What can we do here?
         A. Do they need to have LiveCycle Designer installed on their desktops?
         B. Or, Can we provide a website where we embed the LiveCycle Designer so that the customers can design their PDFs and Data Mappings there?
    2> Provided that we get PDF templates with the data bindings can these be transferred across the servers? Meaning can the customers provide us their PDF Templates and we fill the PDFs on the fly on our end using Livecycle Output Server? Does it work this way or the server and the designer both need to be part of one integrated system?
    3>Do we need the Enterprise suit for this? Or Output Server and Output designer can be independently purchased and used?
    4>The PDFs designed via output designer, can these be used by some third party PDF interpreter software such as iText? Will it retain and expose the data bindings anywhere except the Output Server?
    5> What are the pricing for each of these : Output Designer, Output Server and Enterprise Suit?
    I am sorry if these are irrelevant questions, but I am not able to find the answers myself anywhere over the Internet.
    Any responses will help!
    Thanks in advance

    There is a bit of naming confusion going on here; products are being mixed up.
    As well there is a newer version to the ES 2.5 version Hodmi references.
    LiveCycle Designer works with LiveCycle Output; both available as part of the Adobe Digital Enterprise Suite; you can download an evaluation here - http://www.adobe.com/devnet/enterprise-platform.html
    Under ADEP trial downloads
    We have another, older range of products
    Adobe Output Designer and Adobe Central Pro Output Server. (the link you were looking at)
    These products are older, released before LiveCycle / ADEP; they work well for simple document use cases; but they are old technology and have an end of support date of  June 2016.
    There is no trial download page available; you would need to talk to a adobe rep to get access.
    For new customers we recommend the modern LiveCycle/ADEP product lines.
    You can request that an Adobe rep contact you via - https://www.adobe.com/cfusion/mmform/index.cfm?name=solutions 

  • My iphone 4 was taken not have the tracking because its a dinasour. it does have a pass code to access it. Is there any way to deactivate it so that the person can not use or sell it like by a serial number

    My I phone4 was taken. there is no tracking because Apple told me it was to hold to support the tracking system. Is there any want thatone could track it by the serial number by posting it with apple and if someone trys to reactivate it and registers my number it can be notified that the devise was stolen? Any options

    kjnbaa642 wrote:
    Is there any want thatone could track it by the serial number by posting it with apple and if someone trys to reactivate it and registers my number it can be notified that the devise was stolen?
    No. Apple does no tracking of lost or stolen devices.
    If you set up the Find My iPhone service prior to your iPhone going missing, something which your iPhone certainly would support - any device that can run iOS 5 or later can - then there is a chance that can be tracked, though it depends on a number of factors (the iPhone is turned on, connected to either the 3G or a WiFi network, or has not had the Find My iPhone service disabled or the iPhone been completely restored). Log into icloud.com and go to the Find My iPhone section. If you did not set up Find My iPhone, check with your cell carrier. Some carriers offer their own tracking service, though you usually have to pay for it. 
    If your carrier does not offer such a service and you did not set up Find My iPhone, then there is no way to track the unit. Contact the police and change any passwords for any online accounts you may have used from your iPhone (the iTunes Store, for instance). 
    Regards.

Maybe you are looking for

  • How do I get 720p res video from ipod to mac

    I'm told the default video res setting on the 4th gen Ipod touch is 720p. The only way I can currently get a video that I've shot to my Imac is to e-mail it to myself, which works but knocks the res way down. Do I have to purchase a third party softw

  • DVDSP Motion Menus

    Please forgive me if this topic has come up here before. My situation is I have a motion menu that starts with logo fanfare and then goes to the looping part where you can select "play move" etc. My question is how can I set it so when you press the

  • BPM 11g: problem trying invoke a process instance from Java

    Hi all, I'm trying use this java code http://kr.forums.oracle.com/forums/thread.jspa?messageID=9244238 bpmServiceClientFactory = BPMServiceClientFactory.getInstance(properties, null, null); bpmContext = bpmServiceClientFactory.getBPMUserAuthenticatio

  • What does it WF_EVENT_OJMSTEXT_QH use for?

    Dear all: I found the error in the alert_log: *** 2010-08-05 16:13:26.608 *** SESSION ID:(572.533) 2010-08-05 16:13:26.608 Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x2a96b75000, PC: [0x10efcdf, kdkbin()+223] *** 2

  • [SOLVED] Can't display extended unicode

    Hello, My arch install cannot render extended unicode characters. Example: http://i.imgur.com/3VNpkkI.png I first though it was a font issue, but this website tells me that I have many, many fonts that should display that character: http://www.filefo