Procedure not showing output

Hi!
The following procedure does not show the output.
{create or replace procedure GET_USER
(username_in IN VARCHAR2, password_in IN VARCHAR2, first_name OUT VARCHAR2, last_name OUT VARCHAR2)
is
begin
  declare cursor c_user(i_username IN users.username%TYPE, i_password IN users.password%TYPE) is
  select first_name, last_name
  from users
  where username_in = i_username
  and password_in = i_password;
  i_username users.username%TYPE;
  i_password users.password%TYPE;
  l_first_name users.first_name%TYPE;
  l_last_name users.last_name%TYPE;
  begin
   if c_user%isopen then
     close c_user;
   end if;
   open c_user(i_username, i_password);
    fetch c_user into l_first_name, l_last_name;
   close c_user;
   first_name := l_first_name;
   last_name := l_last_name;
  end;
end GET_USER;}
Output showing only:
First_name =
Last_name =
Thanks for any help!

First of all, you've nested an anonymous block inside your procedure - there is no need to do this.
Second, you don't need to check if the cursor is already open before you open it; it will never be.
So, your code could be rewritten:
create or replace procedure GET_USER (username_in IN VARCHAR2,
                                      password_in IN VARCHAR2,
                                      first_name OUT VARCHAR2,
                                      last_name OUT VARCHAR2)
is
  cursor c_user(i_username IN users.username%TYPE,
                i_password IN users.password%TYPE)
  is
    select first_name, last_name
    from   users
    where  username_in = i_username
    and    password_in = i_password;
  l_first_name users.first_name%TYPE;
  l_last_name users.last_name%TYPE;
begin
  open c_user(username_in, password_in);
  fetch c_user into l_first_name, l_last_name;
  close c_user;
  first_name := l_first_name;
  last_name := l_last_name;
end GET_USER;
/My guess is that nothing is being returned by your cursor for the specified parameters. Test it out by doing:
create or replace procedure GET_USER (username_in IN VARCHAR2,
                                      password_in IN VARCHAR2,
                                      first_name OUT VARCHAR2,
                                      last_name OUT VARCHAR2)
is
  cursor c_user(i_username IN users.username%TYPE,
                i_password IN users.password%TYPE)
  is
    select first_name, last_name
    from   users
    where  username_in = i_username
    and    password_in = i_password;
  l_first_name users.first_name%TYPE;
  l_last_name users.last_name%TYPE;
begin
  open c_user(username_in, password_in);
  fetch c_user into l_first_name, l_last_name;
  if c_cursor%notfound then
    raise no_data_found;
  end if;
  close c_user;
  first_name := l_first_name;
  last_name := l_last_name;
end GET_USER;
/That way, if you get a No Data Found error, you'll know there were no matching rows.
Edited by: Boneist on 09-Jul-2009 12:26
Amended as the cursor wasn't being called with the procedure parameters and it should have been.
This is more likely to have been the cause of the error than no matching row in the cursor!

Similar Messages

  • Pricing procedure not showing up in Inquiry

    Hi All,
    I have developed a very simple pricing procedure for inquiry. It has only one condition type i.e. PR00. I just want to enter price to update the value of inquiry on saving. It works fine if i mention material ode in inquiry, but if i do not mention material code and enter qunatity with some description, then the condtion type PR00 does not show up in the conditions TAB. How can i record my inquiry with quantity and amount for text items.
    SAPXPT

    I suggest you ask this question in an SD forum, this here is about technical questions running a SAP system on SQL Server.
    Markus

  • X2-4 and X3-2: start /SP/console -f not showing output

    Hi all
    I've successfully installed a couple of X3-2 and X2-4 servers at a customer site. I used the ILOM web interface to access the console whilst on site.
    Now that I am not on site I need to use the ILOM cli method. The reason for this is because the bandwidth is too low to allow efficient use of the web interface.
    I attempted to start the console session by typing: start /SP/console -f
    I get the following output:
    -> start /SP/console -f
    Are you sure you want to start /SP/console (y/n)? y
    Serial console started. To stop, type ESC (
    No output is displayed after that until I stop/exit. I need to be able to work on the OS to make network changes so I cannot do it via ssh to the OS.
    The OS version is:
    Oracle Solaris 10 8/11 s10x_u10wos_17b X86
    Assistance with this would be highly appreciated.
    Regards
    Dean
    Edited by: 851956 on 23-Nov-2012 04:49

    Hi.
    /SP/console can work only at text mode, but when solaris start on x86 systems use graphics mode for output.
    So you can use only WEB interface for redirections.
    On support.oracle.com doc: ID 1325578.1 describe step by step procedure for
    "Sun x64 Servers: How to change OS console login to output through ILOM's start /SP/console"
    It just need run command "eeprom console=ttya" and reboot you system.
    But after this you can't use general keyboard and monitor as console. Only /SP/console.
    Regards.

  • Script not showing output

    Hello Geeks,
    I found this ps script online this is reading sql server information from registered keys but its not displaying anything as output can someone please help me how to find its output 
    Any help highly appreciated !!
    try {add-type -AssemblyName "Microsoft.SqlServer.SqlWmiManagement, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" -EA Stop}
    catch {add-type -AssemblyName "Microsoft.SqlServer.SqlWmiManagement"}
    <#
    .SYNOPSIS
    Gets SQL Server WMI information.
    .DESCRIPTION
    The Get-SqlWmi function  gets port, instance and service account wmi information for all SQL instances on a computer.
    .EXAMPLE
    Get-SqlWmi "Z002"
    This command gets information for computername Z002.
    .NOTES 
    Version History 
    v1.0   - Chad Miller - Initial release 
    #>
    function Get-SqlWmi
        [CmdletBinding()]
        param(
        [Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
        [ValidateNotNullorEmpty()]
        [string[]]$ComputerName
        #Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer only works on SQL 2005 and higher. If we fail to gather info at least output
        #null values and computername for 2000 servers in catch block
        BEGIN {}
        PROCESS {
            foreach ($computer in $computername) {
                try {
                    $wmi = new-object "Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer" $Computer -ErrorAction 'Stop'
                    $ht = @{}
                    $wmi.Services| where {$_.Type -eq 'SqlServer'} | foreach {$instance = $_.PathName -replace '".+"\s{1}-s',""; $ht.Add($instance,$_.ServiceAccount)}
                    $wmi.ServerInstances | foreach { 
                            new-object psobject -property @{
                            ComputerName=$Computer;
                            Port=$_.ServerProtocols["Tcp"].IPAddresses["IPAll"].IPAddressProperties["TcpPort"].Value;
                            AccountName=$ht[$_.Name];
                            Instance=$_.Name }
                catch {
                        #SQL Server 2000 Does not support the WMI.ManagedComputer class. Try and use SQL-DMO
                        try {   
                                $dmoServer = New-Object -comobject "SQLDMO.SQLServer"
                                $dmoServer.loginsecure = $true
                                $instances = $dmoServer.ListInstalledInstances($computer) | foreach {($_) }
                                $dmoServer = $null
                                #Clustered server will list server1\instance1 and server2\instance2
                                #Filter so just server1 is listed
                                $instances | where { $_ -like "$computer*"} | 
                                    foreach {
                                                $dmoServer = New-Object -comobject "SQLDMO.SQLServer"
                                                $dmoServer.loginsecure = $true
                                                $dmoServer.connect($_)
                                                new-object psobject -property @{
                                                    ComputerName=$Computer;
                                                    Port=$dmoServer.registry.tcpport;
                                                    AccountName=$dmoServer.StartupAccount;
                                                    Instance = $dmoServer.ServiceName -replace 'MSSQL\$',''
                                                $dmoServer.close()
                                                $dmoServer = $null
                        catch {
                                new-object psobject -property @{ComputerName=$Computer;Port=$null;AccountName=$null;Instance=$null}
        END {}
    } #Get-SqlWmi
    Get-SqlWmi "Servername" >> c:\support\test.txt

    First thing to do is import the SQL PS module
    Import-Module "SQLPS" -DisableNameChecking
    Then run the file, this is the output (it's not very much)
    PS SQLSERVER:\> S:\Get-SqlWmi.ps1
    Port Instance ComputerName AccountName
    1433 MSSQLSERVER SQL1 NT Service\MSSQLSERVER
    This is what it really looks like:

  • Xcode - Not Showing Output / Printing To Screen

    I created a hello world project & it wont show any output at the bottom of the window and I even can't stop running it (although it didn't show any output). Please help me to solve.
    I uninstalled & reinstalled it however the error still persists
    As you can see in the screenshot, it says the program is running and i just can't get any output from the debugger area. What's more, I can't stop it by pressing the stop button.

    These are the two screens I followed to create the project
    I have created new projects, cleaned projects. I have reinstalled Xcode twice & I have even installed Xcode 4.6 & the problem still exists. I used the same Xcode 4.6 dmg file to install it on a friends computer & output can be created on his.
    I currently have OS X Mavericks installed. I didnt use Xcode before I had Mavericks so I dont know if the problem existed before I installed Mavericks. Do you think this is creating the bug?

  • Procedure not showing up when I create 'Form on a procedure'

    I'm building an application based on an Oracle guide for 'Adventure Travel', the guide says to create this procedure:
    CREATE OR REPLACE PROCEDURE
    add_country_for_activity(p_activity_num AT_COUNTRY_ACTIVITIES.activity_num%TYPE,p_country_id AT_COUNTRY_ACTIVITIES.country_id%TYPE)
    IS
    BEGIN
    INSERT INTO AT_COUNTRY_ACTIVITIES (country_id,activity_num) VALUES (p_country_id,p_activity_num);
    END;
    I've added that procedure and I can see it in the object browser, but when I try to create a new 'form on a procedure', the procedure doesn't show up. Also, when I look at the procedure in the object browser, under 'errors' it says "Line: 6     Position: 3     PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; current delete exists prior "
    Although I am assured that the code has the correct syntax, I've also tried adding the / character after END; but to no avail. Any help would be most appreciated

    How do I check dba_objects and user_objects? Sorry I'm pretty new to this. I created the AT_ACTIVITIES table, and I am the one using the application in my own schema. I tried using
    GRANT EXECUTE ON add_country_for_activity to apex_public_user;
    but I'm still having the same problem
    Edited by: 974950 on Dec 4, 2012 11:24 AM

  • Report not showing output

    I am trying to run a report from forms using run_report_object. The report runs fine if I use the following URL in a webbrowser:
    http://hostname.domain:8889/reports/rwservlet?report=PRPLACT.rdf&destype=cache&desformat=pdf&userid=system/admin@I02&server=repserver.
    When I try to run the report using run_report_object() the report is not displayed.
    set_report_object_property('REPORT', report_filename, 'PRPLACT.rdf');
    rptID := find_report_object('PRPLACT');
    SET_REPORT_OBJECT_PROPERT(rptID,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(rptID,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(rptID,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(rptID,REPORT_DESFORMAT,'html');
    SET_REPORT_OBJECT_PROPERTY(rptID,REPORT_SERVER,'repserver');
    add_parameter(plID, 'P_TYPE', TEXT_PARAMETER, strType);
    add_parameter(plID, 'P_ORDERBY', TEXT_PARAMETER, NULL);
    add_parameter(plID, 'P_WHERE', TEXT_PARAMETER, strWhere);
    add_parameter(plID, 'P_USERNAME', TEXT_PARAMETER, :MISC.USERNAME);
    add_parameter(plID, 'P_PERIOD_DATE', TEXT_PARAMETER, strPrdEndDate);
    add_parameter(plID, 'P_SHOWCROSSFOOTFAILURES', TEXT_PARAMETER, :MISC.SHOW_CROSSFOOT_FAILURES_ONLY);
    add_parameter(plID, 'PARAMFORM', TEXT_PARAMETER, 'NO'); -- don't show parameter form to user
    strRpt := run_report_object(rptID, plID);
    Other code that executes successfully all the way to the end

    Using the code sent by u
    1) I cannot see the userid being set which can be set using the REPORT_OTHER parameter.
    v_report_other = '&userid='||get_application_property(USERNAME)||'/'||
    get_application_property(PASSWORD)||'@'
    get_application_property(Connect_string)||
    set_report_object_property(rptid,REPORT_OTHER,v_report_other );
    2) Using the code u will be creating the file in cache ,if u want to show it
    u ll have to use
    web.show_document(<URL>,'_blank')
    _blank will open the report in a new page.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Custom ApiApp in LogicApp not showing outputs.

    I have a very simple custom API app that I have written that I have integrated into a Logic App, the problem I have is that the Logic app is not displaying any outputs for the api app after wiring up an action.
    The ApiApp itself is working fine and calling the action via the swagger UI or directly works as expected. Any idea's where I should start?
    Below is the ApiApp swagger.
    "swagger": "2.0",
    "info": {
    "version": "v1",
    "title": "Test.Parser.Pos"
    "host": "microsoft-apiapp7854774a99cb4c7b88ff49531a169f93.azurewebsites.net",
    "schemes": [
    "http"
    "paths": {
    "/api/RedeemedVoucher": {
    "post": {
    "tags": [
    "RedeemedVoucher"
    "operationId": "RedeemedVoucher_Post",
    "consumes": [
    "application/json",
    "text/json",
    "application/xml",
    "text/xml",
    "application/x-www-form-urlencoded"
    "produces": [
    "application/json",
    "text/json",
    "application/xml",
    "text/xml"
    "parameters": [
    "name": "source",
    "in": "body",
    "required": true,
    "schema": {
    "type": "string"
    "responses": {
    "200": {
    "description": "OK",
    "schema": {
    "$ref": "#/definitions/RedeemedVoucher"
    "deprecated": false
    "definitions": {
    "RedeemedVoucher": {
    "type": "object",
    "properties": {
    "VoucherId": {
    "format": "int32",
    "type": "integer"
    "WhenRedeemed": {
    "format": "date-time",
    "type": "string"
    "Value": {
    "format": "double",
    "type": "number"

    I'll provide my own answer:
    As it currently stands Logic Apps require a "default" response to be defined in the swagger. This is not implemented by default by an API app out of the box, but can be done relatively easily by adding a Swagger OperationFilter.
    That is to say in the
    public void Apply(Operation operation, SchemaRegistry schemaRegistry, ApiDescription apiDescription)
    method of the filter you will need to ensure that the operation.responses dictionary contains an entry keyed with 'default'.
    Microsoft's provided connectors contain a reference to a "Microsoft.Azure.BizTalk.Adapters.SwaggerGenerator.dll" contains a OperationFilter that will do this for you if you don't want to write one yourself.
    Final note: Having spoken to MS about this issue it is currently under review and will hopefully be resolved in a future version of LogicApps so hopefully this will all disapear.
    Edit: Also see http://blogs.msdn.com/b/hosamshobak/archive/2015/03/31/logic-app-with-simple-api-app-with-inputs-and-outputs.aspx

  • LIne Item Reports CJIF & CJID - not showing output

    Hello Friends,
    Can anybody help me to find out why CJIF - Result analysis and CJID - Line item settlement not giving any out put though we are regularly doing RA & settlement for RA as well as Incoming order.
    Thanks and beste regards
    Bharat

    sorry - i should have clarified
    CJID can only be used for line items for settlements to assets
    this report is used when project is for investment
    the line item / summary settlement is part of investment profile, not settlement profile (i should have clarified that earlier)
    if your project is not for investment then use CJI3 from the line items for the project and fileter for the settlement cost element

  • Shows output / summary after executing a procedure

    Developers have come to me, with below challenge, I am not able to solve / help with, found nothing from my 1 hour search on Google and forums.
    Is there parameter in database or SQLPlus that shows output / summary after executing a procedure?
    I have few updates and few inserts in my procedures, I also user[b] execute immediate once on my proc.
    I want to know how many rows were updated / inserted, at the moment you just get ‘successfully completed.’ After executing a procedure.
    SQL> @myproc.sql
    PL/SQL procedure successfully completed.If anyone is 100% it's not possible, and you have to do it manually using dbms_output, please let me know.
    Thanks for any help

    PL/SQL executes inside the Oracle server process that is servicing your client session. How can it display anything on the client side?
    SQL*Plus (a typical client) displays information messages such as "PL/SQL procedure successfully completed." - and it reads the DBMS_OUTPUT buffer in PL/SQL and write it to your display (when the SERVEROUTPUT SQL*Plus environment variable is set).
    PL/SQL is incapable of "displaying" anything. Rendering is done the client.
    It is important to grasp this basic client-server concept.
    PL/SQL is also in fact two very distinct languages that are tightly integrated. PL and SQL. When PL executes a SQL statement, it does so via the same basic Oracle call interface as any other language. Part of this call interface contains the results of the SQL statement executed - this not only include a return code, but also the number of rows reported affected by the SQL engine. PL "publishes" that result via its system variable called SQL%ROWCOUNT.
    However, due to the way PL calls SQL with respect to the different ways you can construct SQL in PL (implicit cursors, explicit cursors, ref cursors, etc), this variable is only valid when dealing with an implicit cursor. Cursor "system/SQL" variables also exist and these are prefixed with the variable name of the cursor in the format <cursorvar>%<sqlvar>.
    Details can be found in the [url http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm]Oracle® Database PL/SQL User's Guide and Reference.

  • Dynamic Portal Page does not show but called procedure behind it works

    Hi I run into a bug that I try to solve unsuccessfully for 2,3 weeks. Here is the problem. I have portal dynamic page that execute a PL/SQL procedure to delete and insert data into a remote app table. When I compile and execute the procedure in Toad it does not give me any error or warning. But when I execute this procedure in my dynamic page the page does not show up but I check the results and data does delete and insert. So my procedure works behind the scene but the page does not display. As I look into detail of my code I found out that when I rem out the insert statement my page does show up and delete the data but when I put back the insert statement my page does not show up and data insert to the table. Here is my code structure of my procedure in plain words. I have a procedure that have a cursor for loop that
    check if a certain condition exists if it is then it will delete data from the remote app table then insert a select statement data from 2 joins tables. Any one have run into similar situations like this and have any idea, please help. Thank you all.

    The scripts for this should have shown as:

  • Image is not showed in Apps Output

    Hi,
    In Apps output image is not showed, but in report builder output images are showed.
    I imported image from my local system. Is there any path in Apps server to keep images?
    Thanks in advance.
    Regards,
    Kalyan

    Hi,
    Are you working ona Report?. If so please check the concurrent program definition, it should be PDF or Postscript.
    Thanks,
    Robert

  • When exporting, the footage in the Input and output monitor is not showing up.

    I use Premiere Pro CS4.
    When I export my project and I choose the formats and options, they all work fine and it will export fine, but my footage does not show up in the input or output source montior.
    Thanks for your time

    See:
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=547004 Bug 547004] – Implement <input type="color">
    ''(please do not comment in bug reports; you can vote instead)''
    * https://developer.mozilla.org/en/HTML/element/input

  • Bridge CS6 Output to HTML Gallery - images not showing up

    Bridge CS6 Output to HTML Gallery issue - my images are not showing up. The files look the same on the local and remote files. The images populate on the local and not on the remote. Is this a JavaScript problem.
    Any help is appreciated.
    I've done a work around solution by using Lightroom, creating a quick collection for a custom order HTML web gallery. I would much prefer to stay within Bridge CS6 and have its HTML gallery actually work...

    Hi AlbiDan,
    Its possible that it might be a Javascript issue. I see that javascript is used in the HTML gallery. Did you upload through Bridge or from an FTP client? Do you have the URL for a broken gallery?
    -Dave

  • Playing movie on tv; playing but not showing up; what output, DVD?

    1st time trying to play movie on tv; playing but not showing up; do I need to change output?  Only DVD &amp; DVR shown. Thx

    You need to provide more information. How are you connecting your iPad to the TV. Are you using an Apple TV 2, a component AV cable, a composite AV cable or the digital AV cable?

Maybe you are looking for

  • Can't read .WMA with Audacious.

    Hey guys, I'm having a little issue reading .WMA files in Audacious. Other players such as VLC and Rhythmbox are able to read such files. Here's the error message I get when trying to read a .WMA: Here's the message I get in the console: [libmpg123/p

  • Java.lang.UnsatisfiedLinkError: CallExe.call(Ljava/lang/String;)V

    hi, I am new in JNI, I created call.dll using MS Visual C++. I want to call JNI call method in Call class. I am working on NetBean, If I called same method using jCreater it works but through netBean it throws following error: java.rmi.ServerError: E

  • Tag value into tag as a parameter error

    It works here : <lib:tablanotas registroID="1" bimestreID="1" /> but when I do this <lib:tablanotas registroID="<%=reg%>" bimestreID="<%=bim%>" /> it doesn`t work neither <lib:tablanotas registroID="<c:out value="${sessionScope.reg}"/>" bimestreID="<

  • Illustrator 3D Revolve  - getting only black 3D

    After doing everything by the book, and giving different sections different colors, I go to Effects 3D Revolve - but get only totally black 3D, no other colors?

  • Keywords in iPhoto 08

    Am I missing the boat on adding keywords to my photos? The most intuitive way for me to add keywords is to select the photos I want to add keywords to, right click, and choose "add keywords". Then I'd be able to type int he words I want. In iPhoto 08