Executing a procedure - Works on Isql Plus but not SQL Developer??

Hi folks.
I am playing around with some design and structure stuff, mostly just passing values around procedures. I have one procedure (procedure1) which takes a sysdate and then passes it to another procedure (procedure2) which takes the parameter and does a dbms_output.put_line.
Both objects are valid, and compile correctly. I use
exec procedure1;
in iSql Plus and it works perfectly. It prints the dates out and all.
However if I use the exact same command in SQL Developer it gives me error "ORA-00900: invalid SQL statement"
I don't understand why this happens?? The code executes perfectly in one but not the other...

Remember that SQL*Plus commands don't work in the worksheet. So, this would fail
exec my_procIn the worksheet you have to declare an anonymous block....
begin
    my_proc;
end;
/If you right-click on the procedure in the Navigator and select Run then SQL*Dev will throw up a harness for you. Very handy if you want to get DBMS_OUTPUT, set variables, etc.
Cheers, APC
http://radiofreetooting.blogspot.com

Similar Messages

  • Downloading a file via a procedure works in one app but not another

    Obviously I've overlooked something. I have this procedure (following). It works in one application that has been running for a couple years. It is called from Column Link with this value #OWNER#.DOWNLOAD_ATTACHED_FILES?p_file=#DOWNLOAD_LINK#
    I'm now making a new application and want the same facility but this same procedure gives me a page not found error even though the error page URL looks like: .../apex/GMCTRL.DOWNLOAD_ATTACHED_FILES?p_file=42 which seems to me that it should work correctly. (the row with the value 42 does exist in the DB)
    Is there a setting/flag/thing that I have to set to make this work in my new application that I've overlooked? (both are APEX 3.1.1 and oracle 11g)
    create or replace PROCEDURE "DOWNLOAD_ATTACHED_FILES" (p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, RPT_DOCUMENT_BLOB_IMG, RPT_DOCUMENT_FILE_NAME_TX, DBMS_LOB.GETLENGTH(RPT_DOCUMENT_BLOB_IMG)
    INTO v_mime, lob_loc,v_file_name,v_length
    FROM RPT_DOCUMENT_BLOB
    WHERE RPT_DOCUMENT_BLOB_ID = p_file;
    owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    htp.p('Content-length: ' || v_length);
    htp.p('Content-Disposition: attachment; filename="'||substr(v_file_name,instr(v_file_name,'/')+1)|| '"');
    owa_util.http_header_close;
    wpg_docload.download_file( Lob_loc );
    end download_attached_files;

    Hello:
    Ensure that
    GMCTRL.DOWNLOAD_ATTACHED_FILES is executable by oracle account used by APEX to connect to the database (apex_public_user or anonymous)
    GMCTRL.DOWNLOAD_ATTACHED_FILES is included into 'WWV_FLOW_EPG_INCLUDE_MOD_LOCAL' as an authorized procedure. See Re: link can't find a stored procedure
    Varad

  • Procedure works in debug mode but not normally

    I'm scratching my head on this and would appreciate any help as to what is happening.
    We have client code that calls stored procedures on an Oracle 10g database. When I run it normally the procedure does not behave as expected. If I try to debug the code it works fine on client until I recompile the procedure again. I don't have the faintest idea why this happens but I'm not sure how to make it work correctly without putting it in debug mode.
    If anybody has any idea what may be occurring I would appreciate the help.

    hmmm, I'm not sure how to do that.
    I do a select against a table into collection then loop the collection as follows:
              FOR Indx IN 1 .. v_Probs_Desc.COUNT
              LOOP
                   v_MyClob := v_MyClob || v_Probs_Desc(Indx);
              END LOOP;
    do some formatting by removing some tags embedded in the text
              v_MyClob := REGEXP_REPLACE(v_MyClob,'<GMT[[:print:]]*:','');
              v_MyClob := REGEXP_REPLACE(v_MyClob,'<GMT[[:print:]]*GMT>','');
              v_MyClob := REGEXP_REPLACE(v_MyClob,'<MAILTO[[:print:]]*MAILTO>','');
              v_MyClob := REPLACE(v_MyClob, '<PERSON', '');
              v_MyClob := REPLACE(v_MyClob, 'PERSON>', '');
              v_MyClob := REPLACE(v_MyClob, chr(13), chr(10));
    Find position of the heading if found (case-insensitive).
              v_End := REGEXP_INSTR(v_MyClob, 'Steps to Reproduce([:punct:])?'||chr(10)||'|Steps([:punct:])?'||chr(10),1,1,0,'i');
              IF ( v_End = 0 ) THEN
                   v_End := LENGTH(v_MyClob);
                   v_Flag := 1;
              END IF;
              IF ( LENGTH(SUBSTR(v_MyClob, 1, v_End)) > 4000 ) THEN
                   v_Text := SUBSTR(v_MyClob, 1, 4000);
              ELSE
                   v_Text := SUBSTR(v_MyClob, 1, v_End);
              END IF;
    --Remove any spaces or newlines from the beginning
              v_Wspace := ASCII(SUBSTR(v_Text, 1, 1));
              WHILE ((( v_Wspace = 10 ) OR ( v_Wspace = 32 )) AND ( LENGTH(v_Text) > 0 ))
              LOOP
                   v_Text := SUBSTR(v_Text, 2, LENGTH(v_Text));
                   v_Wspace := ASCII(SUBSTR(v_Text, 1, 1));
              END LOOP;
    Make sure that the text is less than 4000 bytes so it can be inserted into another table.
              SELECT VSIZE(v_Text)
              INTO v_Size
              FROM DUAL;
              IF ( v_Size > 3950 ) THEN
                   v_Text := 'Created from ' || v_p2t(indx).PROBLEM_ID || '>' || chr(10) || chr(10) || SUBSTRB(v_Text, 1, 3950) || ' ... ';
              ELSE
                   v_Text := 'Created from ' || v_p2t(indx).PROBLEM_ID || '>' || chr(10) || chr(10) || v_Text;
              END IF;
    there's other code but the above code snippet doesn't work outside of debug mode.
    Edited by: dtjasonb on Oct 13, 2009 10:27 AM

  • Chr(10) not working in isql *plus

    Hi,
    Im using oracle 9i. i executed the following statement in sql * plus,
    select 'sankar'||chr(10)||'naraya" from dual
    the output is ,
    sankar
    naraya
    but when i execute the same statement in iSQL *Plus
    the output is
    sankar naraya
    i need the first output in isql * plus. What to do?

    Hello Sankar,
    Here you go
    This can be resolved by modifying the preferences in the iSQL*Plus session to choose a text output format rather than the default HTML format. 
    Select the Preferences button at the top right and then select the Set system variables option to make preference-setting changes. 
    Move down the alphabetical list of settings until you find the Markup HTML area, as shown in Figure 10. 
    Within this area, set the Preformat option to On.
    Clicking OK and OK saves the setting and returns you to the work screen.Here is the link for your reference.
    http://www.dmacc.edu/instructors/rebullard/iSQLPlus%20Users%20Guide.doc
    Cheers!!!
    Bhushan

  • SQL Devloper working fine but not SQL Plus

    Hi,
    I am facing a problem that I can connect to oracle server via SQL Developer but cannot connect to the same using SQL*Plus.
    ORA-12154: TNS:could not resolve service name
    I checked many forums and followed each advices but in vein. To make sure that I have got only one instance of tnsnames.ora file, I removed oracle completely from my system and did the fresh installation of the same.Again, SQL Developer worked but not SQL*Plus.
    Also, I updated dummy value in the tnsnames.ora file to check if SQLDeveloper is pointing to correct ora file, it failed means that its pointing to correct one only.
    Also, this is not the problem with single machine rather my colleague is also facing the same problem while connecting to the same oracle. It suggest me that its rather problem with server side then client one but what do you people think the actual problem can be.
    Kindly advice
    I am using oracle 10.2 and OS window server 2003 standard edition.
    Cheers,
    D
    Edited by: user9022426 on 20-Jan-2010 14:25

    The problem is client side.
    The error message means that you're not getting
    Are you using a TNS connection for SQL Developer?
    If so, this error suggests that SQL Developer and SQL*Plus are not going through the same ORACLE_HOME and/or TNSNAMES.ORA.
    For example, do you have the environment variable TNS_ADMIN set?
    If you have metalink access, then there is a troubleshooting guide for ORA-12154 in Metalink note 114085.1

  • I-pod touch works on a Mac but not a PC

    Please help! My I-pod touch works on a Mac but not a PC. When hooked up to a PC, the device is not recognized in I-tunes message, says I-pod in recovery mode and to restore, after checking update and restore, receive unknown error message (9). Have tried unistaling and reinstalling I-tunes, using different USB ports, creating new user, restarting computer, using different PC, and trying to reset by holding sleep/wake and home buttons all to no avail, very, very frustrated, everything is fine on a Mac!!

    I have CA Internet Security Suite Plus 2010, version 6.0.0.264.
    I was wondering about that one in particular.
    Try configuring you CA as per kalda01's instructions in this post:
    http://discussions.apple.com/message.jspa?messageID=10525876#10525876
    (Sometimes switching the security software off doesn't help, but doing the configuration does help. Not sure what's afoot with that, but it has happened with other security-package problems with iTunes in the past.)

  • Flex mobile 4.6 app works inside flash builder but not in android emulator

    Originally posted on stackoverflow: http://stackoverflow.com/questions/8663892/flex-mobile-4-6-app-works-inside-flash-builder- but-not-in-android-emulator
    I have a basic flex mobile 4.6 app and it works fully fine in the flash builder built-in emulator using an android device profile like aria...
    It also launches fine in the android emulator but one particular view shows blank (and this view works fine in flash builder).
    Before I get in to many details of the view are there any categorical gotchas that can be causing this?
    I can't seem to get the trace statements from the app to show in 'adb logcat'. It seems I need to compile a debug version of the apk but I don't know how to do this. I use the 'Export Release Build' from the Project menu in flash builder and it doesn't seem to have an option for debug=true.
    The problematic/blank view basically uses the stagewebview and iotashan's oauth library to call linkedin rest apis... A different (and working) view can make restful web service calls in the emulator fine, so it doesn't seem to be an internet permission.
    The source code contained in the problematic/blank view is almost identical to the tutorial found at:http://www.riagora.com/2011/01/air-and-linkedin/
    The differences are: a) The root tag is a View b) I use StageWebView instead of HtmlContainer c) I use my own linkedin key and tokens.
    I would appreciate it if someone can provide me with some pointers on how to troubleshoot this situation. Perhaps someone can tell me how to debug the app while running in the emulator (I think I need the correct adt command arguments for this which matches the 'Export Release Build' menu but adds the debug param?)
    Thanks for your help in advance.
    Comment Added:
    I suspect that this has to do with connections to https:// api.linkedin.com and https:// www.linkedin.com. The only reason I can think of that the same code is not having issues inside of Flex Builder but indeed having issues in the Android emulator is something to do with certificates. Any ideas?

    Thanks er453r,
    I have created a project that clearly reproduces the bug.  Here are the steps:
    1) Create a UrlLoader and point it to https://www.google.com (HTTPS is important because http works but HTTPS does not)
    2) Load it
    3) Run in Flash Builder 4.6/Air 3.1 and then run in Android emulator.  The former works with an http status 200.  The latter gives you an ioerror 2032.  I am assuming what works in Flash Builder is supposed to work in the Android Emulator and what what works in the emulator is supposed to work in a physical device (plus or minus boundary conditions).
    I see a certificate exception in adb logcat but not sure if it's related...
    Here is the self contained View code which works with a TabbedViewNavigatorApplication:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:mx="library://ns.adobe.com/flex/mx"
                        xmlns:ns1="*"
                        xmlns:local="*"
                        creationComplete="windowedapplication1_creationCompleteHandler(event) "
                        actionBarVisible="true" tabBarVisible="true">
              <fx:Script>
                        <![CDATA[
                                  import mx.events.FlexEvent;
                                  protected var requestTokenUrl:String = "https://www.google.com";
                                  protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
                                            var loader:URLLoader = new URLLoader();
                                            loader.addEventListener(ErrorEvent.ERROR, onError);
                                            loader.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
                                            loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
                                            loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpResponseStatusHandler);
                                            loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
                                            var urlRequest:URLRequest = new URLRequest(requestTokenUrl);
                                            loader.load(urlRequest);
                                  protected function requestTokenHandler(event:Event):void
                                  protected function httpResponse(event:HTTPStatusEvent):void
                                            label.text += event.status;
                                            // TODO Auto-generated method stub
                                  private function completeHandler(event:Event):void {
                                            label.text += event.toString();
                                            trace("completeHandler data: " + event.currentTarget.data);
                                  private function openHandler(event:Event):void {
                                            label.text +=  event.toString();
                                            trace("openHandler: " + event);
                                  private function onError(event:ErrorEvent):void {
                                            label.text +=  event.toString();
                                            trace("onError: " + event.type);
                                  private function onAsyncError(event:AsyncErrorEvent):void {
                                            label.text += event.toString();
                                            trace("onAsyncError: " + event);
                                  private function onNetStatus(event:NetStatusEvent):void {
                                            label.text += event.toString();
                                            trace("onNetStatus: " + event);
                                  private function progressHandler(event:ProgressEvent):void {
                                            label.text += event.toString();
                                            trace("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);
                                  private function securityErrorHandler(event:SecurityErrorEvent):void {
                                            label.text +=  event.toString();
                                            trace("securityErrorHandler: " + event);
                                  private function httpStatusHandler(event:HTTPStatusEvent):void {
                                            label.text += event.toString();
                                            //label.text += event.responseHeaders.toString();
                                            trace("httpStatusHandler: " + event);
                                  private function httpResponseStatusHandler(event:HTTPStatusEvent):void {
                                            label.text +=  event.toString();
                                            trace("httpStatusHandler: " + event);
                                  private function ioErrorHandler(event:IOErrorEvent):void {
                                            label.text +=  event.toString();
                                            label.text += event.text;
                                            trace("ioErrorHandler: " + event);
                        ]]>
              </fx:Script>
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
              </fx:Declarations>
              <s:Label id="label" y="185" width="100%" color="#0A0909" horizontalCenter="0" text=""/>
    </s:View>

  • Able to connect to database from SQL plus but not from Oracle SQL developer

    Hi
    I have two database editions in my system Oracle XE and Oracle EE. I am able to connect to EE database through SQL plus but not through SQL developer.Please tell me how to do it.
    All settings are good.I am able to connect to the database before installing XE.I need both for my work(different projects).
    And the default listener started is XE's.Please tell me how to change the default one to EE or tell me how to connect through SQL developer??
    Regards
    Harsha

    I Solved it.
    I copied the text from listener.ora for EE
    and added it in the other one.
    It works after restart.

  • How do I troubleshoot installation/distribution of a LabVIEW .exe which processes data using Matlab when it works on some computers but not others?

    I've been given the unenviable task of troubleshooting and installing/distributing software written by a former co-worker. I've modified the LabVIEW code and built an .exe file. I've successfully installed the Labview .exe file on several computers, but it won't work on some others. What's more baffling is that I installed it successfully on one computer, uninstalled it, and tried reinstalling it with no success. In fact, it's a new error (Dr. Watson for Windows NT application error). It doesn't help that I have different versions of LabVIEW and Matlab on the target computers. Some have LabVIEW 5.1, some
    have 5.0, and some don't have it at all. Some have Matlab 5.2, some have 5.3 (R11) and some have 6.0 (R12). It's also not clear to me where the Matlab m files should be located. I'm not sure if it's a LabVIEW Runtime Engine problem, or if it's a Matlab problem. I've also wondered how LabVIEW and Matlab talk to each other. When LabVIEW calls Matlab, it seems that Matlab is running in the background. In other words, clicking on the Matlab Command Window and typing "whos" or any other command/variable doesn't work.

    Jay del Rosario wrote:
    >
    > How do I troubleshoot installation/distribution of a LabVIEW .exe
    > which processes data using Matlab when it works on some computers but
    > not others?
    Poke around zone.ni.com and
    http://digital.natinst.com/public.nsf/$$Search/ .
    Good luck, Mark

  • Site works in the app, but not in the browser.

    Hello iWeb experts,
    I've got problems.
    Last night I published my site. And while it appears, and functions, properly in my iWeb app, it doesn't do the same in Safari, Firefox, and Internet Explorer.
    Two issues...
    FONTS
    I chose Bellamie, Univers Condensed, and Marydale as my fonts. From reading these forums, I've discovered those won't wysiwyg on other computers if the fonts aren't available and open on them. So my two choices are to make every bit of text a graphic or to use a set of more universal fonts, correct? So my questions are...One, is there a list somewhere of fonts that will work in any browser? And, two, is there a short-cut, or easy way to transform type into a graphic without having to create image files?
    FUNCTIONS
    Here are the functions that work fine in iWeb but have gone haywire in all of the browsers I tested...
    • The type in one nav link appears smaller than all the rest.
    • Some links are active, others are not.
    • Rollover highlighting works on some links, but not others.
    • Most of the rollover links appear in the proper static color, a few do not.
    I've tested these functions on three Macs, one PC, and in the three browsers mentioned above. All of them show the exact same problems. So something must be going wrong with iWebs coding, or my host server musn't like iWeb.
    Any thoughts, suggestions on these two issues? Thanks much for any advice.
    John
    PS - For reference, see: www.johnrunk.com

    Fascinating, Kirk (+he types with one raised eyebrow+).
    QuickTimeKirk wrote:
    When I drag across your page most of your links do not change. The "text" portion of them doesn't change, either. Something is covering them.
    I can see that. But for the life of me, I don't know what could be covering those links. In my app, when I click in the area of the links, the type is the first item selected. Unless, possibly, it could somehow be the faint reflection of my black-and-white image (me & the ground I stand on). Hmmm...
    QuickTimeKirk wrote:
    Single click (outside the boundaries of your page contents) and an "outline" will appear. It shows the image file dimensions and locations.
    This I don't see. An outline? As in "an object outline," or as in "a list of dimensions and locations?" When I click outside my page contents, I get nothing.
    Thanks, QTK. I truly appreciate your troubleshooting here.
    John

  • Can get the AirPlay to work off my computer, but not my iPhone or iPad. I have the latest software.  Airplay logo never appears on iPhone or iPad.

    Can get the AirPlay to work off my computer, but not my iPhone or iPad. I have the latest software.  Airplay logo never appears on iPhone or iPad.

    Try here  >  http://support.apple.com/kb/TS1538

  • HT5787 How can I change an old email to a new one? For some reason my old email comes up on my iPhone - and I don't get access to change to my new email which I have on my iCloud account on my pc. My AppleID works on my pc, but not on my iPhone!

    How can I change an old email adress on my iCloud accout to my new email (the same as on my pc), as long as my Apple ID works on my pc but not on my iPhone?
    Br
    Finn

    You would have to change it back to your old email address in order to turn off "Find My iPhone" on your devices. After you changed it back to your old address and deactivated "Find My iPhone" (activation lock) you could change your Apple ID to your new address again. Now it should wok on all your devices.

  • LR 5.6 on Mac desktop all of a sudden will not read any card from any reader but will work on my laptop. I can work on previous images but not import new ones. Even if I create a catalog on laptop and import to my desktop on a thumb drive, the images are

    LR 5.6 on Mac desktop all of a sudden will not read any card from any reader but will work on my laptop. I can work on previous images but not import new ones. Even if I create a catalog on laptop and import to my desktop on a thumb drive, the images are only accessible as long as the thumb drive is inserted.

    Sounds like you may need to repair the Disk Permissions on your drive where your images are stored.

  • I have a bluetooth headset that only works in phone feature but not in itunes or apps on my iphone, please help

    I have a bluetooth headset that only works in phone feature but not in itunes or apps on my iphone, please help.
    It works fine through my macbook, can't find anything in settings on iphone to resolve problem

    The headset has to have A2DP capability, which most (I believe) do not.
    http://en.wikipedia.org/wiki/Bluetooth_profile

  • When i burn videos to a dvd-r disc it works on my macbook but not on a windows/pc or my dvd player. How can i make it work on all the above and not just a mac product?

    when i burn videos to a dvd-r disc it works on my macbook but not on a windows/pc or my dvd player. How can i make it work on all the above and not just a mac product?

    Unfortunately, the recording & movie industry does not respect the rights of the people who make them money, and thus you can only use the paid-for content in ways they see fit. Even if I lived in a bunker where no one else could possibly see the movie I paid for, therefor I'm not 'sharing it illegally', I would still not be allowed in a blue moon to copy that movie to DVD for TV viewing. Someone will tell you to get an AppleTV. How about Apple give us one for free? Until this changes, people wanting to use their content in multiple locations will continue to download music & movies via torrents, legally or illegally.

Maybe you are looking for

  • How to open html attachment in new window?

    My application has a feature to download different types of files(pdf, xls, html) When user clicks on the respective links, a popup with Open, Save and Cancel option will come up. Now the problem is when the attachment is html and user clicks Open, i

  • Import Cycle for India doing first Goods Receipt

    Hi Friends, We are going on upgrade from 4.0B to ECC 5.0. We are using TAXINN .  This is regd. the  Import pricing for India. Our client  is using 4.0B & thier sequence is : 0. Give advance to CHA agent for Customs clearing based on his estimation 1.

  • No SIA in CCM after BOE 4 installation on Win 2008 R2 Ent Server 64 Bit

    Hi, I am trying install BOBJ 4 SP02 (full install not SP02 patch) downloaded from SMP with temporary keys provided at the same location. OS : Win 2008 R2 Enterprise Server x 64 bit BOBJ Files from SMP : SBOP BI PLATFORM 4.0 SP02 SERVER WINDOWS (64B)

  • Passing two queries

    Is there anyway to pass two queries and display their results in one report? Two queries are not related. Thanks. Sylvia

  • [solved] Installing cairo-compmgr: No package 'libvala-0.14' found

    Hi, I am trying to install cairo-compmgr but I cannot pass the configuration step since it complains with this: No package 'libvala-0.14' found But vala is installed: Name : vala Version : 0.16.0-1 URL : http://live.gnome.org/Vala Licenses : LGPL Gro