Exec stored procedure from another stored procedure - not working

Hey, we've got a bunch of .sql files that we run, and some of them are stored procedures. Our programs call the stored procedures from within the .sql files and that works, but we've tried calling a stored procedure from another stored procedure and it won't compile. The syntax looks the same, and we can run that second stored procedure from the SQL*Plus command prompt just fine, so we know it's in there. It doesn't matter whether we type exec or execute in the first stored procedure--it still gives us a compilation error. Here's the relevant bit of the code:
        delete CMHISTORYINDEX;
        commit;
        exec SP_DAILY_TOTAL;
END SP_DAILY_CLOSING;
/Here's where we go into SQL*Plus and try to compile it:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> @sp_daily_closing.sql
Warning: Procedure created with compilation errors.
SQL> show errors
Errors for PROCEDURE SP_DAILY_CLOSING:
LINE/COL ERROR
34/7     PLS-00103: Encountered the symbol "SP_DAILY_TOTAL" when expecting
         one of the following:
         := . ( @ % ;
         The symbol ":=" was substituted for "SP_DAILY_TOTAL" to continue.
SQL>We've also tried changing SP_DAILY_CLOSING to lowercase, but it doesn't seem to help. As I mentioned before, we can type that same sort of thing in .sql files that are not stored procedures and the exec is compiled fine and runs correctly. What are we doing wrong?

In the stored procedure remove "exec" :
        delete CMHISTORYINDEX;
        commit;
        SP_DAILY_TOTAL;
END SP_DAILY_CLOSING;

Similar Messages

  • One r/3 accessible from another but reverse not working

    Hi guys
    when i  try accessing one r/3 from another its accesible using Connection to R/3 type connection , but when i try vice versa it throws error saying
    "Connection error , connection  to host myhostnmae , service sapgw00 timed out / CPI-C error CM_PRODUCT_SP"
    what might be the problem

    Hi,
    are you trying to do R3 - R3 connection
    are you testing from TCODE - SM59?
    if so put your user and pass (in logon tab)
    and try remote logon (F7) 
    maybe the host or system number is not ok ?
    ask someone from your basis team to confirm this
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Exec Store Procedure Not working properly

    Dear Readers, I have a query written on store procedure to give me authors name by ID but is not running well. Can you please let me know what I could be doing wrong. Please see below:
    Database: Pubs, SQL Server 2012
    Objective of Query: Using Store Procedure  to Display names of authors by ID
    Error: The Store Procedure when I execute it doesn't display anything.
    Looks like something wrong in the logic, but not sure what.
    USE pubs
    GO
    Create Procedure usp_getauthors
    AS
     Declare  @id varchar(40)
     Declare  @name varchar(40)
    Begin
    Select
            @name=concat(au_lname,'',au_fname),
            @id= au_id
    FROM
            authors
      End
      GO
    --  Exec usp_getauthors
    Thank-you
    SQL75

    Select
            @name=concat(au_lname,'',au_fname),
            @id= au_id
    FROM
            authors
    This query is only assigning data to local variables.  If you want to return results to the client, omit the variable assignments.  The declare statements are also not needed.
    CREATE PROCEDURE dbo.usp_getauthors
    AS
    BEGIN
    SELECT CONCAT(au_lname, '', au_fname)
    , au_id
    FROM dbo.authors;
    END;
    GO
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?

    How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?
    I currently run OS X 10.10.1
    Now i have been trying to work on this for a while now and what i want to do should be simple but its apparently not.
    Here is an example of what i want to happen.
    I will have 2 tabs: Contact | Sales
    Now Contacts will have the list of names and various information about a customer, While Sales will have one drop-down box for each Cell Row that will show the names of the person in tab contacts
    for what i am wanting to do i cant use the data format pop-up menu because the list is edited everyday several times a day.
    Now how do i do this, Excel can do this so how can numbers do it?

    Hi Shegra,
    Paste this into a applescript editor window and run it from there. In the script you may need to adjust the four properties to agree with your spreadsheet. Let me know if you have any questions.
    quinn
    Script starts:
    -- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column. Then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.
    property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed
    property DataEntryTable : "Sales" --name of table with popups to be refreshed
    set copyRange to {}
    property PopValueSheet : "Sheet 1" --name of sheet with popup values table
    property PopValueTable : "Contacts" --name of table with popup values
    set PopStartRow to {}
    tell application "Numbers"
      set d to front document
      set ps to d's sheet PopValueSheet
      set pt to ps's table PopValueTable
      set s to d's sheet DataEntrySheet
      set t to s's table DataEntryTable
      set tf to t's filtered --this records filter setting on data Entry Table
      display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row
      set PopStartRow to {text returned of result}
      tell pt --convert list to alphabetized popups
      set ptRows to count rows
      set copyRange to ("A2:" & name of cell ptRows of column "A")
      set selection range to range copyRange
      set selection range's format to text
      sort by column 1 direction ascending
      set selection range's format to pop up menu
      -- popupsmade
      set selection range to cell ptRows of column 1 of pt
      set v to value of cell ptRows of pt
      end tell
      activate application "Numbers"
      tell application "System Events" to keystroke "c" using command down
      tell pt
      set selection range to range copyRange
      set selection range's format to text
      end tell
      tell t
      set filtered to false
      set tRows to count rows
      set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))
      set selection range to range pasteRange
      tell application "System Events" to keystroke "v" using command down
      set filtered to tf
      end tell
    end tell

  • After "upgrade" to new firefox, bookmarks didn't transfer. Help tells how to import from another browser but not old firefox. Also my anti virus (latest update) apparently not compatible with 4.0 Can I restore my old version

    Question
    After "upgrading" to new firefox none of my bookmarks are in new bookmarks help topics tell me how to import from another browser but not from previous version of firefox. Another problem is my anti virus ( most up to date) is apparently not compatible with 4.0 liked the old firefox would never have "upgraded" had I known my anti virus wouldn't work. Can I get old version back

    Check with Kaspersky as to what versions of Firefox their programs are compatible with. It is up to Kaspersky to keep their stuff up to date as Mozilla releases new versions of Firefox. And if they are unwilling or incapable of doing it, they should inform their customers of such and maybe refund their customers instead of stringing them along.
    http://forum.kaspersky.com/

  • Reopen All Windows from Last Session is not working

    The option Reopen All Windows from Last Session is not working, is there any other way to recover the tabs from my last session?
    Last night I fell asleep and my friend shut down my laptop.
    When I woke up in the morning I couldn't restore my last session which had several tabs opened for my research.
    I don't know the exact date when I found them, so I haven't been able to find them in History either.
    I've looked around on the internet, but haven't been able to find anything that helped me out.
    Hope you can help me! Thanks.

    Restart your Mac.
    Check the box for:  Reopen windows when logging back in
    Then check History >  Reopen Windows from Last Session

  • HT201210 trying to download an instal ios 7 on my iphone 4s, after half an hour into the download it came up with a message saying failed and everytime i try again the download doesnt start. tried downloading from itunes aswel but not working. anyone know

    trying to download an instal ios 7 on my iphone 4s, after half an hour into the download it came up with a message saying failed and everytime i try again the download doesnt start. tried downloading from itunes aswel but not working. anyone know why?

    The servers are overloaded. There are a hundred million people all trying to download iOS 7 at one time. Try again later

  • The "always match my default message font" option in the Signature preferences from Mac Mail does not work if e-mail is received in other Mail Software. How can I make it work?

    The "always match my default message font" option in the Signature preferences from Mac Mail does not work if e-mail is received in other Mail Software. How can I make it work?

    I found this plugin which solved pretty much all of my mail font rendering problems.  It is designed for Lion, so don't know whether it will work but thought I would offer it up.
    http://noware-it.zxq.net/

  • HT201412 Safari could not open the page because the server stopped responding- new ipad mini's (2 from separate places) are not working with At & T router but computers work. Can you please help me. I've tried everything. Thanks ya'll!

    Safari could not open the page on my new ipad mini's because the server stopped responding- new ipad mini's (2 from separate places) are not working with At & T router but computers work fine. Yesterday I got it to work. Weird. Can you please help me. I've tried everything. Thanks ya'll!

    Hello SavannahSweetie,
    I was looking into the issue you are desribing, and found a great article for troubleshooting wifi connections with iOS devices. It's called iOS: Troubleshooting Wi-Fi networks and connections and can be found here: http://support.apple.com/kb/ts1398.
    Start with this section, and work your way down if needed.
    Basic troubleshooting
    Tap Settings > Wi-Fi and turn Wi-Fi off and then on again.
    Verify that you are in range of your Wi-Fi router or base station.
    Confirm that your Wi-Fi router and Cable/DSL modem are connected to power and turned on.
    Check whether other devices (portable computers, for example) are able to connect to the Wi-Fi network and access the Internet.
    Update your Wi-Fi router to the latest firmware.For AirPort Base Stations, refer to this article for information about firmware updates. For third-party Wi-Fi routers, check the manufacturer's website for details on updating your firmware.
    Restart your iOS deviceHold the On/Off button until "slide to power off" appears. Slide to power off your device. When it is off, press the On/Off button to turn it back on.
    All the best,
    Sterling

  • Redemption code from Photoshop Elements 12 purchased from Best Buy does not work 'Oops! This code doesn't seem to be active. Please contact the retailer you purchased the card from, or use a different code.'   I have an invoice and the pickup notice from

    Redemption code from Photoshop Elements 12 purchased from Best Buy does not work 'Oops! This code doesn't seem to be active. Please contact the retailer you purchased the card from, or use a different code.'   I have an invoice and the pickup notice from Best Buy.   What other information does Best Buy need?   What will they do?   Will I get a new box?   What happened to the days of just typing in a simple s/n?   

    Redemption Code Help
    http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

  • Wish to post KeyNote file as pdf. Export from KN to iW not working

    Wish to post KeyNote file as pdf. Export from KN to iW not working - get blank screen. Tried to upload PDF to mobile me and link to that file - also didn't work. I'm not familiar with iFrames but have read about them in this forum - is that my only option? Why wouldn't a KN export work?
    Thanks, Brian

    I have just tried this with a test site and publishing to a folder and it does work perfectly for me.
    I had a Keynote document already so all I did was click on File and then selected the Print option. I then selected the save as pdf option the the pdf document was created on my desktop instantly.
    All I then did was open iWeb and type some words in a text box My Prices. I then highlighted My Prices and opened the Inspector and went to Hyperlink and clicked on the option Hyperlink to a file. I then selected the pdf file from my desktop.
    I then used ftp to a folder on my desktop and when I opened the appropriate page, I click on the words My Prices and the pdf file opened straight away.
    As OT has suggested, check that you have linked to the correct file. If it does not work, either you have not created the pdf correctly or at all or you have not linked to the correct file.
    As I said, it worked for me.

  • Help!!! I can not make or receive calls! other functions itself. Internet, sms, whatsapp work. I restored as new iphone from the phone and from itunes and still not working.

    I can not make or receive calls! other functions itself. Internet, sms, whatsapp work. I restored as new iphone from the phone and from itunes and still not working.
    Sorry for my english i'm spanish

    I have not tried that...I will look up the process so that I can do it correctly (and still transfer all of my files, contacts, etc).  Any suggestions?  What is the advantage of restoring as a new device..is this more akin to a complete wipe of a hard drive?

  • Windows 7 Defrag from command line does not work

    We are running Windows 7 in a virtualized environment. When running windows defrag using schedule or from command line, it does not work. The command that I am executing as administrator is
    C:\Windows\system32>defrag /c
    Microsoft Disk Defragmenter
    Copyright (c) 2007 Microsoft Corp.
    It displays the above message and exits back to the command prompt. However if I run the command defrag C: it does work. Defragmenting from the GUI works as well as long as both the disks (C: and System Reserved) are selected and when I click on
    Defragment disks, works fine.
    I am concerned about defrag running from the task scheduler with the command "defrag /c" (auto scheduled using Configure Schedule... from Disk Defragmenter) does not work and the system never gets defragmented automatically.
    This happens only with some of the windows 7 VM's that we have.
    There are no entries in Event Log that point to the defrag (using task scheduler). Any ideas what may be going on?

    Hi,
    Could you defrag as below method:
    1. Open Disk Defragmenter by clicking the Start button. In the search box, type
    Disk Defragmenter, and then, in the list of results, click
    Disk Defragmenter.
    2.Under Current status, select the disk you want to defragment.
    3.To determine if the disk needs to be defragmented or not, click Analyze disk. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
    Once Windows is finished analyzing the disk, you can check the percentage of fragmentation on the disk in the
    Last Run column. If the number is above 10%, you should defragment the disk.
    4.Click Defragment disk. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
    For more information, please read this article:
    Ways to improve your computer's performance
    http://windows.microsoft.com/en-in/windows/improve-performance-defragmenting-hard-disk#1TC=windows-7
    Meanwhile, read this article:
    Defrag from the Command-Line for More Complete
    Control
    http://technet.microsoft.com/en-us/magazine/ff458356.aspx
    Karen Hu
    TechNet Community Support

  • Yesterday suddenly the sound output from my Headphone is not working

    Hi, I've Mac Book Pro 15" with Retina display. Yesterday suddenly the sound output from my Headphone is not working. When I tried to solve this, I've noticed in system preferences it's jumping from Internal speakers to Head phone and vice versa. Can anyone help me on this issue please? I am using the original Apple Headset only.
    Thanks
    Babu
    <Re-Titled By Host>

    Tell us:
    OS X version ?
    What may have changed prior to the onset of the issue of "... suddenly... not working..." and " ... preferences ... jumping from ..." ? Software added, upgraded, updated?
    what precidely do you mean by " ... preferences ... jumping from ..." ?
    ÇÇÇ
    EDITadded
    I see that your Question has languished for some period of time without response. You have posted your issue in Using Apple Support Communities whose topic is 'How to use this forum software's interface, features and/or how to find what you wish'. It is a relatively low traffic and inappropriate forum for your problem. I will ask our Hosts to move it to " MacBook Pro " where it may get a more rapid response from your fellow users.
    endEDIT

  • Wireless keyboard numbers from 1-9 are not working .

    My wireless apple keyboard numbers from 1-9 are not working. No water was spilt on it and tried the numlock.
    I asked local store and he said that i should purchase a new one which i don't want to.
    Is there a solution ?? Please help

    Hi jacky256,
    If you are having issues with your Apple Wireless Keyboard, try the steps in the article below.  The section "Keyboard has one ore more keys that do not respond" may shed some light on this issue.
    Troubleshooting wireless mouse and keyboard issues - Apple Support
    https://support.apple.com/en-us/ts3048
    Regards.
    - Judy

  • Hi i have bought an iphone from dubai but its not working in pakistan

    hi i have bought an iphone from dubai but its not working in pakistan its not syncing my phone displaying mesage that invalid sim card. I have changed sim card but its not working. Can you please help to to make it work. Its a pay as u go phone.

    Fais1 wrote:
    I have called to the shop where i bought the phone they told me that phone is not locked. I have tried so many times but phone is not working vth any sim a part from the one i have bought from dubai. Pls let me know how to check that phone is locked or not. Thanks
    And, of course, they would NEVER lie to you after they already have your money...

Maybe you are looking for

  • X-Fi ExtremeMusic Software doesn't look ri

    I just installed the card last night and I figured I would just get the latest drivers from the web, rather than use the CD. The card works but the software does not look at all like what's advertised everywhere. I just have a boring panel with tabs

  • Which Firewire Cable for my MacPro?

    I was just about to connect my new external HD to my MacPro, but found out that the Firewire cable doesn't match my MacPro. When I did a search for buying Firewire 800 cables, three different types showed up! Which Firewire 800 cable to I need for my

  • Transferring songs from iPod to PC

    I have been having problems with my iPod holding a charge although it says the battery is fully charged - I've been told that I might need to send it to apple to have the batter replaced. Before I do that I would like to have all my songs (about 700)

  • Different Caller IDs are desired to be displayed on each different call???

    Hi all, My customer has just transitioned to SIP Trunk (to an ITSP). They use CUCM 10.5 and CUBE (2901 ISR G2). CUBE is used to communicate with the ITSP. Everything is working. Yesterday they gave me a call asking whether it is possible to show diff

  • Can't highlight the text in table?

    I put some texts in inline tables, but when I preview the ibook in iPad, I notice that I can't highlight those texts and take notes. Did anyone else notice this?