How to execute a script(.sql) file from a PL\SQL procedure

I would like to know how to execute a .sql file from a stored procedure and the result of it should update a table. My .sql file contains select statements.

Hi!
just go through the following piece of code -
SQL> ed
Wrote file afiedt.buf
  1  declare
  2    str varchar2(200);
  3  begin
  4    str := '@C:\RND\Oracle\Misc\b.sql';
  5    execute immediate(str);
  6* end;
SQL> /
declare
ERROR at line 1:
ORA-00900: invalid SQL statement
ORA-06512: at line 5ORA-00900: invalid SQL statement
Cause: The statement is not recognized as a valid SQL statement. This error can occur if the Procedural Option is not installed and a SQL statement is issued that requires this option (for example, a CREATE PROCEDURE statement). You can determine if the Procedural Option is installed by starting SQL*Plus. If the PL/SQL banner is not displayed, then the option is not installed.
Action: Correct the syntax or install the Procedural Option.
Regards.
Satyaki De.

Similar Messages

  • How to execute/call a cfm file in an Oracle stored proc?

    Hello everyone! I'm quite new to Oracle PL/SQL stored
    procedure. Is it possible and how do you call/execute a coldfusion
    file from an Oracle stored procedure? I know that cfm files can
    call stored procedures. How about the other way around? Any ideas
    or suggestions is much appreciated. Thanks..

    I'm having a hard time trying to think of why you would
    actually want to do something like that. However, all that aside,
    the short answer is no. The database has no real "knowledge" about
    ColdFusion, and there is no way for PL/SQL to "execute" anything on
    the ColdFusion server. Maybe if you were more specific as to what
    you were actually trying to do rather than such a generic question,
    someone might be able to help you find an alternative.
    Phil

  • How to run an external .exe file from an indesign pluging

    Hi,
          Suppose if I have written an separate application in C++ (.exe file) & need to run it from an indesign pluging(as if a service in windows). have you provided that facilities in your SDK? if it's please let me know how to run an external .exe file from a indesign pluging.
    Thanks,

    I'm actully writing data in PMString to a external txt file.
    another question..
    if i want to execute an action when the ok button is cliked how can i do it?
    whe i add a button(widget) i know how to handle it. please see my code.
    // Call the base class Update function so that default behavior will still occur (OK and Cancel buttons, etc.).
    CDialogObserver::Update(theChange, theSubject, protocol, changedBy);
    do
    InterfacePtr<IControlView> controlView(theSubject, UseDefaultIID());
    ASSERT(controlView);
    if(!controlView) {
    break;
    // Get the button ID from the view.
    WidgetID theSelectedWidget = controlView->GetWidgetID();
    if (theChange == kTrueStateMessage)
    //if (theSelectedWidget == kEXTCODGoButtonWidgetID
    switch(theSelectedWidget.Get())
             case kEXTCODGoButtonWidgetID:
      this->ViewOutput();
      break;
             case kEXTCODFindButtonWidgetID:
      this->SaveLog();
      break;
    // TODO: process this
    } while (kFalse);
    I do two actions "SaveLog" & "ViewOutput()" using two buttons. But i dont know how to execute an action when the ok button is clicked...

  • How can I move an icon/file from one screen of my ipad to another?

    How can I move an icon/file from one screen on my ipad to another?

    Press and hold the icon until they start to wiggle. Then while holding it, drag it to the edge of the screen and wait for the page to switch, then let go of the app

  • How can  I checkout an existing file from CVS without going through the wiz

    How can I checkout an existing file from CVS, that is not already in my local jdev, without going through the wizard and checkingout everything?

    You can't. AI doesn't produce .PLT files.

  • How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?

    How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?

    In iTunes with your iPhone connected, click on the iPhone device, select the Apps tab, scroll down to the File Sharing section and pick an app that plays Quicktimes ("Files Connect" works in this example, but I'm open to suggestions of better apps for playing transferred Quicktimes) and drag your Quicktime from Finder to the Documents pane for the File Sharing app.   Once the file transfer is complete, go to the app on your iPhone to play the Quicktime.

  • How to delete a READ ONLY file from Directory

    Hi Friends,
    how to delete a READ ONLY file from Directory , file is in my system only.
    Please help me .
    note: its read only file.
    Thank you.
    Karthik.

    hI,
    try with this statement.
    delete dataset <datasetname>.
    this will definitely work.
    Regards,
    Nagaraj

  • How can I prevent a PDF file from being copied, printed or downloaded? Students should only be able to view the text and and not distribute it in any way.

    How can I prevent a PDF file from being copied, printed or downloaded? Students should only be able to view the text and and not distribute it in any way.

    You can prevent it from being printed by applying a security policy to it
    in Acrobat. The rest can't be prevented, unless you spend  a LOT of money
    on DRM protection.

  • How can open a html, pdf files from the server (c:\foldername\filename)

    Hi all,
    I am developing an application. in this app i have to implement RMI.
    My problem is this, How can a client open a files from the server.
    all the html, pdf files are stored in the server's directory like C:\audit\filename.
    There is a folder on the server's C directory which contains all the html , pdf files.
    please tell me how can a client open a file from the server using RMI.
    Please send me the solution as soon as possible.
    Thanks & Regards
    Bhavishya

    That's doing it the hard way. Why not use HTTP or FTP?

  • How do I move all my files from one User Profile (account) into another? I needed to create a new account and want all of my files accessible in the new one.

    How do I move all my files from one User Profile (account) into another?
    I needed to create a new account and want all of my files accessible in the new one.

    ok, what you're learning right now is 101 unix, which is good. Unix is a good thing
    now: the way unix works, and macos (which uses unix underneath) the files and folders work like a hierarchy.
    the start of that tree is /
    so, if you were to do:
    cd /
    (cd means change directory)
    it will bring you at the highest branch of the file system.
    cd /Users
    will bring you to where all the users are.
    to see whats in /Users you can use your friend ls command
    ls means list files/directories
    so:
    cd /Users
    ls -la
    (the -la here means show all (even hidden) and long format (very verbose))  this flag is very optional.
    you will see
    fred
    user2
    for example.
    if you want to see the desktop of user2 you would change directory to it then list the files.
    for example:
    cd /Users/user2/Desktop
    Note that the files and directory are case sensitive, so, desktop is NOT the same as Desktop, or DESKTOP
    ls -la
    you should then be able to see everything in users2 desktop
    you could have done as well the same thing in smaller steps, for example:
    cd /
    cd Users
    cd user2
    cd Desktop
    this is the equivalent of cd /Users/user2/Desktop
    So, for your file, i don't know where it was, but know that if you log in as user2, it will directly put you in
    /Users/user2
    which most likely the file you had created from the other user was in /Users/user1
    if you copied all the files from /Users/original_user to /Users/secondUser
    most likely yes, all your mail, bookmarks etc would be copied over.
    so in your case.
    sudo chown -R seconduser:staff /Users/secondUser
    should work
    Remember that if you start a path with the character /  it means start from the root of the file system, at the highest top you can ever get.
    so
    cd /Users/fred
    is not the same as
    cd Users/fred
    unless you were in / already
    i know it may be confusing at first but it's actually very logical if you play with it.
    to simplify, think of it that / means C:\  on windows
    you can't go any higher than C:\  (in a way)
    if you're unsure which directory you're currently in, you can always type:
    pwd
    it will tell you where you are.
    for example:
    cd /
    pwd
    this shows  /
    cd Users
    pwd
    this now shows /Users
    cd /System/Library
    pwd will show /System/Library
    cd /
    cd /Users
    cd fred
    cd Library
    pwd will show /Users/fred/Library
    unix can look very scary but it's actually vital and very necessary to do tasks sometimes that would take for ever to do via the windows. This is good learning.
    so for the myfile you had created, i can't tell you where it is, at the time you created, if you can do a pwd command you'll know the path,
    ls -la  (this shows all the files where you are)
    if you see myfile in the list
    do a pwd
    whatever is return, the real location of the file would be:
    whatever pwd returned / myfile
    I hope that makes sense.

  • How do I move a keynote file from my computer to my ipad?

    I have a Mac OS X version 10.6.8 and an Ipad version 7.0.6. How can I move a Keynote file from my Mac to my Ipad? I do not have Icloud on my Mac.

    Have you tried e-mailing the Keynote file to yourself? You can then press and hold on the attachment in Mail and choose to open in Keynote. However the results may depend on your version of Keynote.

  • I have converted a pdf to word. How can I access the Word file from my online account?

    I have converted a pdf to word. How can I access the Word file from my online account? When it says 'download the converted file' I choose a location on my PC and click, but nothing happens. It seems that it can only save the converted file to my online account. I went to my online account but I see no way to look for the file

    Hey Fabrizio,
    You might need to sign up at "https://cloud.acrobat.com/exportpdf" using your Adobe ID credentials to convert your PDF file to Word.
    Do you get the 'download' prompt?
    Also, you can find the converted files by clicking at the 'Files' tab. 
    Please try the same using a different browser and check.
    Hope to hear from you.
    Regards,
    Anubha

  • How do I transfer a music file from my MacBook Pro to my iPhone?

    How do I transfer a music file from my MacBook Pro to my iPhone?

    If you download Adode Reader (free but very limited) or GoodReader (many features) - you can use file sharing.
    Connect the iPad to the Mac and launch iTunes. Select the iPad on the left side under Devices. Click on the Apps tab in the iTunes window on the right. Scroll down to the File sharing apps window. Click on the file sharing app that you are using (Adobe Reader or GoodReader in this example). Drag the document from the desktop onto the file sharing window on the right side - or click on the add button in the lower right corner - and navigate to where the file is on the Mac and select it that way.

  • How do I import my video files from old iPhoto - in time machine - to new iPhoto?  Photoes came across, video said incompatible.

    how do I import my video files from old iPhoto - in time machine - to new iPhoto?  Photoes came across, video said incompatible.
    i have moved from a mac pro to a mac mini,
    Mini now has mavericks and latest iLife stuff, I clicked import, was all good, then at end, no videos came across.
    Is Mavericks,/iPhoto having a compatibiltiy issue with some video formats....???
    Your help is appreciated gang.: )

    Please describe exactly what you did. In moving to a new machine no importing is involved. The best way is to simply connect the two computers together and drag the iPhoto library from the old one to the pictures folder go the new one and launch iPhoto
    LN

  • How do I copy my video files from iPhoto to iMovie. The two   hour wait to view all in iMovie puts the kibosh on my edit time.

    How do I copy my video files from iPhoto to iMovie? The two + hour wait for thumb nails and hour long wait looking for the right videos kills the time I have to edit.

    You need to convert the VOB files in the TS-Folder of the DVD back to DV which iMovie is designed to handle. For that you need mpegStreamclip:
    http://www.squared5.com/svideo/mpeg-streamclip-mac.html
    which is free, but you must also have the  Apple mpeg2 plugin :
    http://www.apple.com/quicktime/mpeg2/
    (unless you are running Lion in which case see below))
    which is a mere $20.
    Another possibility is to use DVDxDV:
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.overview.htm
    which costs $25.
    For the benefit of others who may read this thread:
    Obviously the foregoing only applies to DVDs you have made yourself, or other home-made DVDs that have been given to you. It will NOT work on copy-protected commercial DVDs, which in any case would be illegal.
    If you are running Lion:
    From the MPEG Streamclip homepage
    The installer of the MPEG-2 Playback Component may refuse to install the component in Lion. Apple states the component is unnecessary in Lion, however MPEG Streamclip still needs it.
    To install the component in Lion, please download MPEG Streamclip 1.9.3b7 beta above; inside the disk image you will find the Utility MPEG2 Component Lion: use it to install the MPEG-2 Playback Component in Lion. The original installer's disk image (QuickTimeMPEG2.dmg) is required.
    The current versions of MPEG Streamclip cannot take advantage of the built-in MPEG-2 functionality of Lion. For MPEG-2 files you still need to install the QuickTime MPEG-2 Playback Component, which is not preinstalled in Lion. You don't have to install QuickTime 7.

Maybe you are looking for

  • Hp laptop won't turn on at all.

    I have no idea what model it is. Where do I find this in the machine. The laptop won't turn on. I have changed the fuse in the plug but the wires are not getting warm. I have no idea. When the battery is in and I try to turn it on the orange light fl

  • Netflix slow on MAC, speedy on Win 7 PC

    Hi, I am trying to get my macbook pro i5 to play streaming netflix. I used to do it on my win7 HP laptop for some time and it works nice. on my mac, quality went down, when I tried to figure out why, I found out that the netflix stream is of lower qu

  • Multiple entries in Library ???

    I recently imported a folder into my library. Unfortunately, it contained files that were already in my library. Now I have doubles of almost everything in my itunes !!! How can I get rid of the multiples ? Thanks in advance. Cheers,

  • App-V 5.0 SP2 user applications published via SCCM 2012 to VDI workstations with roaming only

    Hi, The environment consists of App-V 5.0 SP2 (KB2956985) user based applications published via SCCM 2012 to Windows 7 VDI snapshotted workstations that are reset at user logoff. When a user logs on the SCCM 2012 client initiates App-V client package

  • How can I check and see my saved password

    I want to check my saved passwords on firefox mobile and modify them.