FORALL and FOR when to use

Hi,
I am just confusing..what is the difference between FORALL and FOR.

Why it works?
declare
var1 varchar2(500);
type varray_type is table of varchar2(50);
v_varray varray_type;
begin
v_varray := varray_type('smith', 'king', 'jones');
for i in 1 .. 3 loop
var1 := var1 || ',' || v_varray(i);
end loop;
dbms_output.put_line(var1);
end;
OUTPUT: ,smith,king,jones
And why it is not..
declare
var1 varchar2(500);
type varray_type is table of varchar2(50);
v_varray varray_type;
begin
v_varray := varray_type('smith', 'king', 'jones');
forall i in varray.first .. varray.last
var1 := var1 || ',' || v_varray(i);
end loop;
dbms_output.put_line(var1);
end;
I am still confusing..can't we assign values to variable in FORALL?
please suggest me.

Similar Messages

  • A year ago I brought a 1 TB hard drive (My Passport), I have not used it for over 4 months and now when I use the USB cord to connect it to my mac, it does not register the hard drive.  Does anyone know why this is happening?

    A year ago I brought a 1 TB hard drive (My Passport), I have not used it for over 4 months and now when I use the USB cord to connect it to my mac, it does not register the hard drive.  Does anyone know why this is happening?

    The beeps could be caused by something as simple as a loose internal wire or connection.  If it is under warranty (not sure how long that is, as WD drives range from 1 to 5 years depending on the model's series - I think "my passport" drives are 3 years) you could contact WD and ask them about it.
    If it is out of warranty, you could also try opening the case and check the connections - the drive may be fine, and there have been posts on TomsHardware forums of people getting the beeps, opening up the case and the drive is fine, just some wire worked loose.

  • I have a problem with my blackberry 9360, I bought it last 2months, and now when I use video camera or camera I saw a red and blue line. Can someone help me with this issue?

    I have a problem with my blackberry 9360, I bought it last 2months, and now when I use video camera or camera I saw a red and blue line. Can someone help me with this issue?

    Hello zukafu, 
    Welcome to the forums. 
    In this case we can try to reload the software on the BlackBerry® smartphone to make sure it is running the latest version and there are no issues with the OS.
    Here is how to backup your BlackBerry smartphone http://bbry.lv/oPVWXc
    Once you have backed up your BlackBerry smartphone please follow the link below to complete a clean reload of the BlackBerry smartphone software.
    Link: http://www.blackberry.com/btsc/KB03621
    Once completed test it and proceed with a selective restore, here is how to restore http://bbry.lv/qgQxLo
    Thank you
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • Error in checking FORALL and FOR performance in PL/SQL.!

    I am using FORALL and FOR construct' comparison in term of times taken by them(performance).
    This is whats my problem:
    SQL> SET SERVEROUTPUT ON;
    SQL> CREATE TABLE T1(C1 VARCHAR2(100));
    Table created.
    SQL> declare
    2 t1 number;
    3 t2 number;
    4 t3 number;
    5 begin
    6 for i in 1..10
    7 loop
    8 t1:=dbms_utility.get_time;
    9 insert into t1 values('RAVIKANTH');
    10 end loop;
    11 t2:=dbms_utility.get_time;
    12 forall i in 1..10
    13 insert into t1 values('RAVIKANTH');
    14 t3:=dbms_utility.get_time;
    15 dbms_output.put_line('Time taken for FOR'||TO_CHAR((t2-t1)/100));
    16 dbms_output.put_line('Time taken for FORALL'||TO_CHAR((t3-t1)/100));
    17 end;
    18 /
    declare
    ERROR at line 1:
    ORA-06550: line 13, column 1:
    PLS-00435: DML statement without BULK In-BIND cannot be used inside FORALL
    ... dear friends, please help me out in resolving this.
    Thanks in advance,
    Ravikanth K.

    Forall works with sets of data, like index-by tables. Here's an example:
    declare
       t1 number;
       t2 number;
       t3 number;
       type r_tt is table of t%rowtype
          index by binary_integer;
       tt r_tt;
    begin
       for i in 1..10
       loop
          t1:=dbms_utility.get_time; -- <----- this one should be outside the loop
          insert into t values('RAVIKANTH');
       end loop;
       t2:=dbms_utility.get_time;
       -- Load the index-by Table
       for i in 1..10
       loop
          tt (i).c1  := 'RAVIKANTH';
       end loop;
       -- Use this index-by Table to perform the Bulk Operation
       forall i in 1..10
          insert into t values tt (i);
       t3:=dbms_utility.get_time;
       dbms_output.put_line('Time taken for FOR'||TO_CHAR((t2-t1)/100));
       dbms_output.put_line('Time taken for FORALL'||TO_CHAR((t3-t1)/100));
    end;You probably won't see much difference in elapsed time. You testing a single insert again a bulk operation.
    btw: You have a local variable with the same name as your table

  • I have iWork on my new MacBookPro and it works fine.  But I had the Beta iWorks in iCloud on my older desktop.  How do I get the Beta iWorks off my iCloud because it is different (and better) when I use it on my MacBookPro?

    I have iWork on my new MacBookPro and it works fine.  But I had the Beta iWorks in iCloud on my older desktop.  How do I get the Beta iWorks off my iCloud because it is different (and better) when I use it on my MacBookPro?  Shouldn't the iCloud be the same as the MacBookPro iWorks

    billjudy wrote:
      Shouldn't the iCloud be the same as the MacBookPro iWorks
    No, they are different apps.  The beta one in icloud is for use by PC's as well as Mac's via a web browser and lets users collaborate on documents.  It can't removed.  Just ignore it if you have no use for it.

  • Guidelines for when to use SE vs. EE

    Are there any guidelines for when to use Standard Edition and when to use Enterprise Edition? Any limits on Standard edition as far as transactions/sec or number of users or size of database? Other than a list features that are not included in SE are there any other limitiations or reasons I should not go with SE over EE?

    Have you checked out www.javaworld.com. They usually have very good and in-depth articles. IMHO, it all depends on the sort of use your library is intended for. If its used extensively by native code, use C++ with a Java wrapper. It its the other way around, implement it in Java and use a JNI interface for native code. I would really consider this carefully before implementing stuff in C++ that is used from Java. First of all, Java is after all much simpler than C++, its a more elgant OO-language and you have the platform neutrality. On the other hand, C++ has its sides. I dont use JNI unless its absolutely neccessary, in situations like using legacy code.
    These are just a few of my thoughts, hope it gives you some hints.

  • Static n TV, and worse when I use my wifi. Was fine yesterday.

    Static on bedroom TV and worse when I use wifi. Was fine yesterday and living room TV is not affected.

    pate827 wrote:
    Static on bedroom TV and worse when I usewifi. Was fine yesterday and living room TV is not affected.
    Apologies for the issue and the experience that you described above. In reviewing your account I do see a technician visit currently scheduled for Wednesday so that we can get this issue identified and resolved. Thanks for your patience.  

  • HT201250 HAD MY MICROSOFT OFFICE 2011 loose a bunch of its add ons and plugins when i used a mac keeper software how do i get it back

    HAD MY MICROSOFT OFFICE 2011 loose a bunch of its add ons and plugins when i used a mac keeper software how do i get it back

    MacKeeper, being poorly written, acts like highly invasive malware* that can de-stablize your operating system. It is also unethically marketed and a rip-off, offering nothing that is not available for free.. Positive reviews of it are known to have been paid for by the developers, Zeobit.
    Further opinion on it and how to uninstall MacKeeper malware:
    http://applehelpwriter.com/2011/09/21/how-to-uninstall-mackeeper-malware/
    Do NOT download or use the ‘MacKeeper uninstaller’ from the Zeobit site, as this will cause even more damage to your operating system.
    This is also worth reading:
    http://www.reedcorner.net/news.php/?p=245
    Equally phoney is iAntivirus:
    http://www.reedcorner.net/news.php/?p=341
    * The expression ‘malware’ is a general term used by computer professionals to mean a variety of forms of hostile, intrusive, or annoying software.

  • How can I make the background one solid color?  It is too difficult and noticeable when I use the retouch button and try to erase all the creases in my backdrop.  So, how can I have just a solid white background?

    How can I make the background one solid color?  It is too difficult and noticeable when I use the retouch button and try to erase all the creases in my backdrop.  So, how can I have just a solid white background?

    When talking about a specific image posting the image may be useful.
    One can use a Layer Mask and add a white Layer underneath.

  • I have an iPad 2 and iPhone 4 and for them I use I cloud I have also 1 pc windows and at work place I use windows pc ; until now my files are stored on an external disk drive could' I use iCloud to perform the backup of my external disk drive ? Thanks

    I have an iPad 2 and iPhone 4 and for them I use I cloud I have also 1 pc windows and at work place I use windows pc ; until now my files are stored on an external disk drive could' I use iCloud to perform the backup of my external disk drive ? Thanks
    Loredano

    These are the options you have.
    Budget $1299.
    http://www.apple.com/macbookair/
    http://www.apple.com/macbookpro/
    Best.

  • What are the configuration need between R3 and XI when we use RFC sync adap

    hi,
    What are the configuration need between R3 and XI when we use RFC sync adapter.
    Regards
    siva.

    if its the sender adapter ref:
    RFC adapter
    Sender- /people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
    Receiver;
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/e80440a832e369e10000000a155106/content.htm
    Also;
    trouble shooting rfc/soap -
    /people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009

  • My iMac 27" screen is black and will not start. The computer is making noise and beeps when i use the keyboard but I can't see anything. I have rebooted with no success

    My iMac 27" screen is black and will not start. The computer is making noise and beeps when i use the keyboard but I can't see anything. I have rebooted with no success

    Have a look at these. And please say what OS you have.
    http://support.apple.com/kb/ts1411
    http://support.apple.com/kb/ts1367

  • Hi, I bought an iPad and was so impressed by Safari that I replaced Chrome with it on my Windows XP Toshiba laptop and now when I use Safari the icons on the screen continue to flicker until I come out of Safari. Is there a cure other than using a Mac

    Hi, I bought an iPad and was so impressed by Safari that I replaced Chrome with it on my Windows XP Toshiba laptop and now when I use Safari the icons on the screen continue to flicker until I come out of Safari. Is there a cure other than using a Mac

    When I use find file http://www.macupdate.com/app/mac/30073/find-file (which does tend to find files that "Finder" can't), it's not coming up with any other itunes library files that have been modified in the past week, which I know it would have been - unfortunately, I don't have a very recent backup of the hard drive.  It would be a few months old so it wouldn't have the complete library on it....any ideas?  I'm wondering if restarting the computer might help but have been afraid to do so in case it would make it harder to recover anything...I was looking at this thread https://discussions.apple.com/thread/4211589?start=0&tstart=0 in the hopes that it might have a helpful suggestion but it's definitely a different scenario.

  • Usb mouse auto disconnect time and time,Screen flash and flash when I use discrete graphic card

    as title
    My usb mouse auto disconnect and reconnect time and time,
    no one knows when the mouse will disconnect,but every time when that mouse disconnect ,it will be reconnected in 2-5sec.
    Screen flash and flash when I use discrete graphic card with the battery or use AC when connect the external display with VGA CABLE.
    Mouse: Logitec G400/G1
    Display:Lenovo D2081WIDE
    machine:T430 2349 CTO

    system info:
    machine TYPE: THINKPAD T430 /2349CTO
    operating system :Lenovo OEM ultimate X64 SP1
    mouse type:Logitech G400 and Logitech G1
    time:from 2012-10 to now
    threat NO.1
    USB mouse auto disconnect and reconnect time and time,no one knows when the mouse will disconnect,but every time when that mouse disconnect ,it will be reconnected in 2-5sec.
     every time when the mouse disconnect I heard the sound which like USB DEVICE unplug,and when it reconnected I heard the sound which like USB DEVICE plug in.
    threat NO.2
    Screen flash and flash when I use discrete graphic card with the battery or use AC when connect the external display with VGA CABLE.
    threat NO.3
    the battery auto losing capacity!!!!!!
    1% everyday about 0.2Wh
    since I bought to now,
    the Design capacity has losing from 57.XX Wh to 47.52Wh
    and full charge capacity is 48.68.
    the battery info:
    cycle count is 18
    Bar-Code number 1ZKFD27S1RF
    SerialNumber 1896
    First used date 2012-09
    FRU 45N1001
    Firmware 0003-0080-0100-0165

  • Hi,i have a big problem,.my ipad2 is lost,i left in public place...and then when im using the find my ipad apps.i accidentally clicked the remote wipe button,is there still way to track my ipad .thanks..

    hi,i have a big problem,.my ipad2 is lost,i left in public place...and then when im using the find my ipad apps.i accidentally clicked the remote wipe button,is there still way to track my ipad .thanks..

    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
     Cheers, Tom

Maybe you are looking for

  • Expanding text tree

    I would like to create a tree menu with an image acting as the plus and minus. Any help would be appreciated. I am very new to dreamweaver, so please be gentle!! :)

  • Soundtrack Pro?

    Recently there's been a lot of talking on the web about the future of Apple's (pro) video and audio applications.   Adobe has some aggressive deals for people switching to Premiere Pro or the Creative Suite (which as you know now includes Audition). 

  • Video clips have perfect audio but no picture in Quicktime, VLC has perfect audio and jittery picture... How is this fixed?

    I have a Canon 550D and a class 6 Sandisk extreme 3 card which I have been taking great photos and film clips. Yesterday I captured some content and when I put it into my macbook pro, the images were clear as per usual however the videos only appeare

  • VAT GL is not picking from J_1IT030K_V table for the business place in FB60

    Hi, We have defined the VAT GL based on business place, while posting FB60 (Vendor invoice), system picks the VAT GL from OB40 instead of J_1IT030K_V table.... (While posting MIRO it is correctly picking from J_1IT030K_V table). Please advsie. Thanks

  • Testing out mms by sending myself a picture or message

    I have a 8820 and my provider is t-mobile.  I have been trying for a month now to figure how to send myself a test picture and message to verify that MMS is working.  I have had several different phone models from other companies and they allow me to