This construct is not allowed as the origin of an assignment

Please help..
create or replace package testins as
x number;
y number;
z number;
end;
create or replace procedure p5 as
begin
for i in 1..5 loop
testins.x(i):=i;
testins.y(i):=i+1;
testins.z(i):=i+2;
end loop;
execute immediate
'begin
forall i in 1..:n
insert into test (a,b,c) values
(testins.x(i),
testins.y(i),
testins.z(i));
end;' using 5;
end;
Error:
*4/1 PLS-00308: this construct is not allowed as the origin of an assignment*
*4/1 PL/SQL: Statement ignored*
*5/1 PLS-00308: this construct is not allowed as the origin of an assignment*
*5/1 PL/SQL: Statement ignored*
*6/1 PLS-00308: this construct is not allowed as the origin of an assignment*
*6/1 PL/SQL: Statement ignored*

Hi,
try this ...
create or replace procedure p5 as
begin
  for i in 1 .. 5 loop
    testins.x := i;
    testins.y := i + 1;
    testins.z := i + 2;
  end loop;
  execute immediate 'begin
for i in 1..n
loop
insert into test (a,b,c) values
(testins.x,
testins.y,
testins.z);
end loop;
end;'
    using 5;
end p5;You have the package variables as numbers, not collections which is why you cannot use them with an array index viz.
testins.x(i):=i;Hope it is clear.
PS : code not tested

Similar Messages

  • Documents I forward are not received under the original document name. How do I solve this?

    Documents I forward are not received under the original document name. How do I solve this?

    If you're referring to the name of the attatchment showing when viewing the entire email, that's there's no way to change how it's done.  The title and body of the actual document is unchanged after it's opened. 
    Does this naming of the attachment really confuse the recipient?  If so, put something in the body of the email to make it clear what's attached.

  • Java daemon on boot: "This user is not allowed access to the window system right now."

    The daemon is located in /Library/LaunchDaemons/ and launches successfully on most occasions. However, it sometimes fails to start with this error:
    Nov 17 20:36:24 server.local java[28972]: This user is not allowed access to the window system right now.
    Nov 17 20:36:24 server com.apple.launchd[1] (net.java.server): Throttling respawn: Will start in 10 seconds
    I have the server command running as a background daemon using its "nogui" option (the developers claim to have written it to not display a gui). However, it seems that somewhere along the line, Java is trying to display something. As the daemon is running before users log in, it gives this error. Once a user is logged in to the system, it runs fine; however, logging in a user to run the server is not an option. It needs to run on boot.
    Any ideas for how to solve this? I'm going to contact the developers to see if it may be something they can fix, but I want to be able to force the issue in case the problem ever occurs in the future.

    Irrespective of any claims by the developer, this certainly appears to be a test case that shows that the tool is not working as expected, and that the application has a bug.  This test case would be better if there was some evidence around why only some of the startups fail, but in general this will involve what's been suggested earlier:  "Contact the application developer."  
    As some general background on what's involved, see daemons and agents and related; processes that are not allowed to connect to the GUI for reasons of security.
    I'd also suggest testing your DNS, as seeing "server.local" can imply local DNS configuration errors.   Launch Terminal.app  from Applications > Utilities and issue the following harmless diagnostic command and see if it reports no changes, or if it detects network or DNS errors:
    sudo changeip -checkhostname
    If this is OS X Server and a NAT'd network, you do not want to reference any DNS servers located off of your NAT'd network.
    Why DNS?  Because DNS errors can cause only some operations to fail, particularly if there's more than one DNS server selected (and where some subset of the DNS servers are malfunctioning or misconfigured).

  • HT1657 when I try to watch the movie from my iPAD on tv monitor it says that 'this device is not allowed'. Is there any way to watch in tv monitor a rented movie from iPAD?

    when I try to watch the movie from my iPAD on tv monitor it says that 'this device is not allowed'. Is there any way to watch in tv monitor a rented movie from iPAD?

    Having the same problem. Watched 25 minutes of a rental and it stopped with the message"unable to load video"
    Using current version IPad mini.
    Ios7 is  HUGH PIECE OF CRAP!!!!

  • How to Uninstall Yosemite?  System does not allow Erase the HD, nor does it allow re-install of original O/S Disc (10.6.7).  I want Mavericks or even Lion Back.   Thanks.

    How to Uninstall Yosemite?  System does not allow Erase the HD, nor does it allow re-install of original O/S Disc (10.6.7).  I want Mavericks or even Lion Back.   Thanks.

    Start with reinstalling Snow Leopard:
    Clean Install of Snow Leopard
    Be sure to make a backup first because the following procedure will erase
    the drive and everything on it.
         1. Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came
             with your computer.  Insert the disc into the optical drive and restart the computer.
             After the chime press and hold down the  "C" key.  Release the key when you see
             a small spinning gear appear below the dark gray Apple logo.
         2. After the installer loads select your language and click on the Continue
             button. When the menu bar appears select Disk Utility from the Utilities menu.
             After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
             size.)  Click on the Partition tab in the DU main window.  Set the number of
             partitions to one (1) from the Partitions drop down menu, click on Options button
             and select GUID, click on OK, then set the format type to MacOS Extended
             (Journaled, if supported), then click on the Apply button.
         3. When the formatting has completed quit DU and return to the installer.  Proceed
             with the OS X installation and follow the directions included with the installer.
         4. When the installation has completed your computer will Restart into the Setup
             Assistant. After you finish Setup Assistant will complete the installation after which
             you will be running a fresh install of OS X.  You can now begin the update process
             by opening Software Update and installing all recommended updates to bring your
             installation current.
    Download and install Mac OS X 10.6.8 Update Combo v1.1 Access the App Store to download Mountain Lion or Yosemite. Mavericks is no longer available since the release of Yosemite. If you purchased Mountain Lion from the App Store, then you can redownload it via your Purchases page in App Store. If not, then you will need to purchase it from Apple;
    Purchase a redemption code at the Online Apple Store: OS X Mountain Lion. Mountain Lion is $19.99 plus tax. Use the code to redeem a download of Mountain Lion from the App Store. The file is quite large, over 4 GBs, so allow some time to download. It would be preferable to use Ethernet because it is nearly four times faster than wireless.

  • Manual value adjustments are not allowed in the year of settlement

    Hello Experts ,
    We have an AUC which has a value of 683,969.70 .  Now we have an unplanned depreciation  of 82,500.00-  which is yet to be posted .
    My user wants to run AIBU to do an AUC settlement for the same asset .
    However it is giving the following error .
    Manual value adjustments are not allowed in the year of settlement
    Message no. AW609
    Diagnosis
    It is not possible for technical reasons to settle an asset under construction (802438 0) with manual value adjustments in the year of settlement.
    Procedure
    Reverse the manual value adjustments in the year of settlement. Post them directly to the settlement receivers.
    Please advice what needs to be done .
    Regards
    Anirban

    Hi:
            By standard AUC assets are never subject to any kind of depreciation. They are assigned 0000 deo key in OAYZ . This is the cause of the error you are facing. Reverse unplanned depreciation and then settle it.
    Regards

  • He system software on this startup disk only functions on the original media

    i welcom.ith a warning ofantheer on my g4 when my frieend told it to boot os 9.2 after boot thee first disk wasnt finished loading now the g4 wont boot it goes to the system the system software mon this startup disk only functions on the original media not if copied to another drive. Has a restart tab but at this point it has frozen and the mouse and keyboard do not functiuon. NEED HELP

    Did this machine work before you tried to install 9.2?
    you may not have the correct cd. i think you need the restore cd that came with the machine.
    Where did you get the cd?  black or grey?
    We need your exact machine.
    Query by serial number
    "A serial number is a unique, identifying number or group of numbers and letters assigned to an individual piece of hardware or software. It's used for various things depending on the product / brand but what is your Mac's serial number for and more importantly... what is it hiding and what can it do for you ?"
    http://www.appleserialnumberinfo.com/Desktop/index.php
    >i welcom.ith a warning ofantheer on my g4
    >when my frieend told it to boot os 9.2
    why?
    does the cd boot into the software installation process?
    Where you able to pick what disk to install onto?
    >after boot thee first disk wasnt finished loading
    Could be a damaged disc.  How long did you wait?
    >now the g4 wont boot
    We understand this line.
    >it goes to the system the system software mon
    Don't understand this.  What appears on the screen?
    >this startup disk only functions on the original media not if copied to another drive.
    & your point is?  You need to use the installation software to install.  You cannot copy the cd. 
    >Has a restart tab but at this point it has frozen and the mouse and keyboard do not functiuon.
    I don't understand this.  Can you take a picture & post here.
    >NEED HELP
    Don't we all.
    You are allow to edit your posts for 15 minutes.  The edit is to the upper right in a sidebar.
    Plese spell check the document before posting.

  • Error message: this computer is not supported by the system recovery media.

    I replaced a bad samasung hard drive in my Pavilion dv6z 3200 with a Seagate Momentus XT 750 GB 7200RPM SATA 6Gb/s 32 MB Cache 2.5 Inch Solid State Hybrid Drive ST750LX003 and when trying to restore Windows 7 64 bit OS get the error message "this computer is not supported by the system recovery media"

    Is the new hdd at least as large a capacity as the original? Can be larger capacity, but sometimes smaller will cause error.
    Enter BIOS by tapping F10 key. Is all system info intact/complete?
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • The value 4010 39 99 is not allowed for the field MARC-STEUC/BAPI_MARC-CTR

    Hi all,
    BAPI' BAPI_MATERIAL_SAVEDATA' throws error the below error while creating material.
    'The value 4010 39 99 is not allowed for the field MARC-STEUC/BAPI_MARC-CTRL_CODE'
    Any idea abt this error.
    Regards,
    Thiyagu

    Hi,
    As this BAPI is triggered from external sytem that by client in production environment , I would not be able to dig it further.
    Thats why I asked if anybody confronted the same error previously.
    Thanks for suggestion.

  • The value  is not allowed for the field Cross-plant CM

    Hello All
    When i copy material in refernce to existin gone. I am getting this message
    "The value  is not allowed for the field Cross-plant CM"
    I am not putting any thing in this Basic-view Cross-plant CM, but still getting this message.
    Any help will be good...Thanks in advance...

    Hi,
    Please check the check box in front of the field config material is checked?
    If so then this material is configurable material
    A material that can have different variants.
    For example, a car can have different paint, trim, and engines.
    Configurable materials have a super bill of material (BOM) that contains all the components for producing every variant of the material. Similarly, they have a super task list that contains all the operations. When a material is configured, only the components and operations needed for a variant are selected.
    Please check
    BR
    Diwakar

  • I just updated to iTunes 11. This version will not allow me to change info on any songs. Have always use "command i" with previous versions. Anyone else experiencing this problem? A solution?

    I just updated to iTunes 11. This version will not allow me to change info on any songs. Have always use "command i" with previous versions. Anyone else experiencing this problem? A solution?

    Hey! I had the same problem you did just today when I was trying to get my second iPhone to sync. What you need to do with music or anything extra that you doing you have to creat a second playlist or picture or anything that you would like to use, so that you can add to the second device that you are going to be using. I am not sure if that will help but it helped me out a lot!! Good luck!

  • HT1277 I am unable to Quit Mail and this then does not allow me to shut down my desktop apple.

    I am unable to Quit Mail and this then does not allow me to shut down my desktop apple.

    Welcome to the Apple Support Communities
    Open  > Force Quit and close Mail

  • The value 1 is not allowed for the field variace key

    Hi experts,
               When i was creating material master i was getting the status message as "the value 1 is not allowed for the field variance key" , but its stopping there its not moving out of that screen and creating the material record. When i see this field in the material master configuration its an optional field. Can you give me suggestions, where it can go wrong.
    Thanks & Regards,
    Ravi.

    Hi
    Can u tell me the field name . I cant get that field ref key. In which view does it come.
    Reg
    Raja

  • The update operation is not allowed in the current state of the request

    When users have logged a request through the service manager 2012 portal and they go back in to add user input they sometimes receive a message that says " The update operation is not allowed in the current state of the request." The state of the
    request has not changed it is still Active and has not breached its service level .
    I can't seem to find any information about this error and don't know how to troubleshoot it. Any help and advice would be appreciated.
    Thanks
    Sarah

    ok, so they're adding user comments after creating the service request. looks like this:
    the first thing to check is that the user is added to the default, un-scoped "End User" security role, or the custom end user security role they are added to has a scope that includes all work items. The "user input" field adds a user comment related
    to the SR, so the ability to create user comments is required to use this field.

  • Sorry, this content is not allowed - absolutely puzzled - how to resolve?

    Hi all,
    I tried to start a new thread today - put a lot of effort into the question - good
    English, code (with tags) tested - basically no problems - forum SQL and PL/SQL
    There were absolutely no offensive words, nor indeed could what I wrote
    be construed as anyway offensive (in fact I positively acknowledged another
    poster's contributions).
    When I try to post "jive" (more like "hive" - the kind that itches) refuses
    to accept my post and I get the message - "Sorry, this content is not allowed"
    I tried to edit bits, move bits around, but to no avail.
    What can I do to resolve this issue? Is it common?
    Any ideas, references, URL's ideas, whatever appreciated.
    Paul...

    Billy  Verreynne  wrote:
    There is a list of banned words on OTN to counter spam. A bone of contention
    that has been raised and discussed numerous times here.
    Do not use sales pitch words - like disc0unt. What about b0nus? Or pr1ce?
    Do not use words that refers to articles of clothing like sho3s or j3ans.And if one is writing an app for the garm3nt industry?
    Is it a frustration? You betcha. I've complained bitterly about it. But the OTN admins seem
    convinced that to counter spam, regular posters and valid postings have to feel the pain. :-(V. annoying - it's not like the volume of traffic is huge... I know that I've been told before that
    the current version of hive is not going anywhere - but for the (apparently) vapourware
    that is the new forum software could have a "rep" status and obviously those who use
    obscenities will be "chaparoned" until they mend their ways...
    <rant>
    It's a bit sad that the world's second largest s/w company can't have a semi-decent
    configurable forum system - it also says much about their attitude to the volunteers
    who give of their time and effort on these fora - I've had much more help here than
    I've ever got off metalink - or whatever they're calling it these days. Furthermore
    it strikes me that it would be a good showcase for Apex - another pet rant is that
    the sample apex apps that were available are no longer there, despite the web
    site saying that they would appear - and that's a good three years now...
    Anyway, another cross to bear...
    </rant>
    On a more positive note, I've criticised Oracle from time to time and have had
    cross words with some fellow posters and have never had a post deleted or
    a thread that I started locked.
    Anyway, keep up the good work on PL/SQL and SQL and Database-General.
    Paul...

Maybe you are looking for