Execute Package - Display results?

How do I execute a package in SQL Developer? Here is my package body. I am trying to see the results of the cursor which I am assumming is going to have the rows returned in it. I am new to Oracle and so I am having a hard time with the syntax and what it is looking for.
create or replace package custom_pkg
as
TYPE t_cursor IS REF CURSOR;
procedure usp_customdisplay_sel (p_cursor out t_cursor);
end;
create or replace package body custom_pkg
as
     procedure usp_CustomDisplay_Sel (p_cursor out t_cursor)
     as
     begin
          open p_cursor for select * from gp2.PM_REPORTS;
     end usp_customdisplay_sel;
end;I want to see the resuls for the select statement. Isn't there an easier way to do this with procedures?
Thanks,
Greg

I have a similar problem trying to execute a package and return a resultset using sql deveoper. I'm new to writing packages - how do i do this using SQL Plus if this is not possible using SQL Developer?
I'm using the following to execute the package in SQL developer
DECLARE
P_CURSOR OWNER.RIGHTS.rcur;
BEGIN
RIGHTS.ROLES_TO_ADMIN(
P_CURSOR => P_CURSOR
-- Modify the code to output the variable
DBMS_OUTPUT.PUT_LINE('P_CURSOR = ' || P_CURSOR);
END;
this does not return anything. In fact gives this error -
Error report:
ORA-06550: line 9, column 25:
PLS-00306: wrong number or types of arguments in call to '||'
ORA-06550: line 9, column 4:
PL/SQL: Statement ignored
Thanks

Similar Messages

  • In Executable program displaying results in custom screen.

    Hi,
    I have a executable program,  when the program display's the out put of this program I need to display output in custom screen (like screen 100) instead of displaying in default List screen.
    Can any one tell me how to create and display output in that screen.
    Thanks.
    Chris.

    Hi,
      Check the pseudo code....
    <b>Start-of-selection.</b>
    Retrieve data
    <b>End-of-seleciton</b>
    call screen 0100.
    <b>*PBO</b>
    form PBO_200 output.
    endform.
    <b>*PAI</b>
    FORM PAI_200 input.
    endform.
    To call Screens use any of the following commands
    <u><b>1. CALL SCREEN scr.</b></u>
    Addition:
    ... STARTING AT x1 y1 ... ENDING AT x2 y2
    <b>Effect</b>
    Calls the screen scr; scr is thenumber of a screen of the main program. You use SET SCREEN 0. orLEAVE SCREEN. to define thereturn from the CALL screen.
    <b>Addition</b>
    ... STARTING AT x1 y1  ENDING AT x2 y2
    <b>Effect</b>
    The coordinates x1, y1 (start column andstart line in the window) and x2, y2 (end column and endline in the window) define the size and position of the CALLscreen ("top left - bottom right"). Besides these coordinates,you can also see the contents of the primary window, but cannot performany action there.
    <b>Note</b>
    If "ENDING AT ..." is not specified, suitablevalues are substituted for x2 and y2, taking into accountthe size of the called screen.
    <b>Note</b>
    <b>Runtime errors:</b>
    DYNP_TOO_MANY_CALL_SCREENS: No further screen level (callscreen); the maximum number of nested screen levels is restricted to 50at present.
    2. <u><b>SET SCREEN scr.</b></u>
    <b>Effect</b>
    In ABAP dialogs: Sets the number of the nextscreen.
    Screen number scr is then processed when the current screen has finished.
    <b>Example</b>
    SET SCREEN 200.
    <b>Notes</b>
    To leave a CALL SCREEN chain or return to the application menu, use one of the followingstatements:
    SET SCREEN 0. or LEAVE TO SCREEN 0.
    I hope this solves your problem.
    Regards,
    Vara

  • Execute Package Task

    1. I have a CSV file which contains (  PackageLocationWithName, source info (table/file/accesdb) & other control info) 
    2. I load the CSV file into the SQL Server Table ConfigurationTab
    3. In the SSIS package I assign the values returned from select * from ConfigurationTab to
    a system object : SubjectStagelist ( system.object) Result Set :  ResultName: 0 ..1..2.. , Variable : user:: SubjectStagelist
    4. In the ForEachLoopContainer I use : collection : For Each ADO Enumerator
                                                              ADO Object Source Variable : user:: SubjectStagelist
                                                              Enumeration Mode : Rows in the first table
    5. Created  variables equals to number of column in the table(csv file):  
    6. Assigned these variables as index 0,1,2... in Variable Mappings in the ForEachLoopContainer ( Assuming that the values from the SubjectStagelist will be assigned to the new variables )
    7. Under the ForEachLoopContainer I have the execute process task. Here I want to n number of child packages to perform the data load from source to target ( n = no of rec in csv file which is fixed)
    In the execute package task I use the location as File, point to one of the files as connection and under expressions  - I have connection as @user::PackagePath (this variable will hold the complete package path with name e.g c\desktop\....\pkgName.dtsx).
    When I try so save the master package in the execute package task, I use the location as file which
    automatically changed to SQLSERVER from file and also throws the error by saying
    The connection "c\desktop\....\pkgName.dtsx"
    is not found. This error is thrown by Connections collection when the specific connection element is not found.
    "@user::PackagePath" on property "Connection" cannot be written to the property. The expression was evaluated, but cannot be set on the property.  
    But it keeps on giving me this  error ? Am I following the right steps ? 
    Please advice....
    Neil

    Hi Visakh,
    Now I am getting the below error.  In SQL table I have the data type as datetime for
    Date_Endtime(in Pkg it is datetime) variable and Integer for
    Int_Batch_Nbr(in pkg it is Int32) variable
    How can I typecast this if required, as I am capturing entire record into Object variable for further processing
    Error: 0xC001C012 at ForEach Loop: ForEach Variable Mapping number 10 to variable "User::Date_Endtime" cannot be applied.
    Error: 0xC001F009 at MSTR_Pkg: The type of the value being assigned to variable "User::Int_Batch_Nbr" 
    differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object.
    Neil
    I think the issue is you've variables jumbled up in the mapping within for each loop. You need to make sure the index mapped to Date_EndTime corresponds to resultset column with datetime values and that to Int_Batch_Nbr corresponds to integer values. As
    of now its not correct which is why it complains about data type mismatch.
    Also didnt understand why you unmarked original answer as it was the solution to your actually posted problem. Now what you're asking is an unrelated issue. Anyone looking at this would have benefited with previous answer if their original issue was with
    execute package task property expression.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Execute Package Utility Requires Integration Services

    Hi,
    I am trying to run an SSIS package from a client SQL Server Management Studio 2008 and am getting the message "The Execute Package Utility requires Integration Services to be installed by one of these editions of SQL Server 2008..."
    I installed SP1 and CU6 on the PC and am still getting the message.  Any ideas?  Any help is appreciated.
    Thanks

    Hello,
    I was getting same error message and This post helped me.
    I got more info from below:
    http://www.rad.pasfu.com/index.php?/archives/41-Minimum-Requirement-To-Execute-SSIS-Package.html
    Minimum Requirement To Execute SSIS Package
    A very common question is that : 
    what is minimal requirements for run a package? 
    Minimal Requirements to run SSIS package is :
    DTEXEC which can be installed
    with Integration Service at the SQL Server setup media. Note that you should Install Integration Services, because if you install DTEXEC without Integration Service then you will got this message when you try to execute a package from DTEXEC command line:
    The SQL Server Execute Package Utility requires Integration Services to be installed by one of these editions of SQL Server 2008: Standard, Enterprise, Developer, or Evaluation. To Install Integration Services,
    run SQL Server Setup and select Integration Services. 
     This is same operation on a machine who has Integration Service Installed:
    Another option to execute SSIS package is with BIDS, you can select it during SQL Server setup steps.
    So as a result you need to have one of these options to run a package on a machine: SSIS or BIDS.
    Thanks Shiven:) If Answer is Helpful, Please Vote

  • Error: The Task has failed to load on Execute Package Task using TFS Build and MSBuild.exe on dedicated Build Machine.

    I'm trying to automate my building and deployment of SSIS packages using TFS build definitionss in conjunction with MSBuild.exe on a separate build machine.
    I have successfully built and deployed my projects but receive the following error:
    Error: Failed to load task "etl_UWP_Stage_tstg_7_Large",type "".  The contact information for this task is "Microsoft Corporation: Microsoft SQL Server .... "
    This error happens at runtime as well as if I perform a "Validate..." on the SSIS Catalog on the server.
    This only occurs when trying to execute a package that contains an Execute Package Task.  Any other packages that are doing the actual work are working just fine.
    In addition, when I do the MSBuild from my developer machine with the same deployment process everything works fine, even the Execute Package Task.
    I can even open up the project on the build machine in VS2012, rebuild all, then deploy and everything works fine.
    Some things I've considered/verified:
    1) Visual Studio 2012 and Visual Studio Data Tools 2012 are both on the build machine and my local machine.
    2) The .NET version being used by VS2012 is the same on the build machine and my local machine.
    3) I find it suspicious that the "Type" referenced in the error above is blank...but not sure where to go with that.
    4) Obvious difference is that during the TFS Build and Deploy on the build machine, everything is running under the TFS Service account, rather than my account...once again...not sure where to go with this, but it is a significant difference.
    Has anyone had similar issues or have any thoughts on things to try?
    Thanks,
    Jason

    Not sure why I couldn't find this answer in my earlier searches...
    But this thread solved it for me:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/3aa1e324-da32-4ea0-865c-c69f610ef262/failed-to-load-execute-package-task-error?forum=sqlintegrationservices
    Essentially I had to install SSIS on the build machine so that the 64-bit version for
    ExecPackageTask.dll, was available.  I did this from the original media CD selection Integration Services as a feature.
    Hope this helps someone in the future.

  • Failed to load Execute Package Task error.

    Hello Experts,
    Excuse my newbie question.
    Execute Package Task: Error: The task has failed to load. The contact information for the task is "Microsoft Corporation; Microsoft SQL Server; Microsoft corporation; All Rights Reserved http://www.microsoft.com/sql/support/default.asp:1"
    We have a windows service running on our app server that deploys a package that executes other packages using execute package task. This package and rest of the packages are in the same folder at the same level under integration services
    catalog. The package fails to execute with the above said error.
    Execute package task is configured to run in 'in-process' mode. Changing delay validation to true/false in child packages didn't help.
    ironically if the package is deployed using a console application from the app server the package gets executed just fine. I checked permissions, everything seem fine.
    Is there anyway to get details of this error to understand the problem better? I am looking at reports > standard reports > all executions.
    Thanks.

    As it turns out, the 63bit ExecPackageTask.dll was not found under "C:\Program Files\Microsoft SQL Server\110\DTS\Binn". Installing "SQL Server Data Tools" installed only 32 bit version of the component under "C:\Program Files (x86)\Microsoft SQL
    Server\110\DTS\Binn".
    Is there a way to get 64bit version of this component without installing "Integration Services" (to avoid possible license issues)?
    Hi Jayakarthiks,
    To make use of the 64-bit ExecPackageTask.dll, you also need the 64-bit SSIS runtime and 64-bit DTExec utility tool. To obtain the 64-bit SSIS runtime and tools, you have to install the SQL Server Integration Services service from your SQL Server 2012 install
    media.
    Reference:
    http://msdn.microsoft.com/en-us/library/ms143731.aspx
    Regards,
    Mike Yin
    If you have any feedback on our support, please click here
    Mike Yin
    TechNet Community Support

  • The process cannot access the file because it is being used by another process with Execute package task

    Hi,
    I've a master package that calls other packages with an Execute Package Task. Sometimes we have an error: "The process cannot access the file because it is being used by another process" and sometimes not. It seems random.
    We are working on a Terminal Server and the SQL Server database engine and the files are placed on another server. It seems that the errors doesn't occu when we run the packages on the server with a job. We can't log onto the windows server on this machine..
    Hennie

    I've seen this myself. On most occasions an immediate rerun would fix the issue. As stated this happens only when we try to run this from BIDs. From SQL agent job it always runs fine. 
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to configure search results web part to display results only after a query is generated from user?

    Hi All,
    I am crawling documents from a file server. I created a new content source and crawled the documents. All documents are crawled successfully.
    Then I went to my enterprise search center site collection and created a new result source. I have added the query to use above content source.
    After that, on a page I am trying to configure the search results web part to display documents using this result source. Now the problem is:
    It displays all the documents that are crawled without searching for anything. I mean first it should not display any results. If a user searches for something , then according to that search it should display results.
    Any idea how to do this in the web part? I am using SharePoint 2013 on premise enterprise edition. No code. Totally OOTB.

    Hi Mohan,
    What did you use for the Query text in the result source?
    I could reproduce this issue when I used Query text like: {searchTerms} Path:”http://sps2k13sp/sites/First/Shared%20Documents”
    Then I changed the Query to
    {?{searchTerms}
    Path:"http://sps2k13sp/sites/First/Shared%20Documents"}
    , then Search result web part didn’t return results without searching.
    So , check your result source, and use the Query like the above(adding "{?...}").
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Unable to display results of multiple query in grid in Oracle SQL Developer

    Hi, I am a newbie to this forum and couldn't find the Oracle SQL Developer forum so posting it here.
    My question: How to display multiple query results in grid in Oracle SQL Developer.
    Example:
    select * from Employee;
    select * from Department;
    - when I select both the queries and hit F5 in Oracle sql developer. By default it displays in output window.
    - How to display result of both the queries in Grid.
    Any thoughts on this would be really helpful.
    Thanks in advance.
    Harsh

    Hi Harsh,
    I'd say that the Results grid is designed to only show the results of 1 query at a time. I don't know/can't see how it would display multiple queries at a time.
    I would suggest either joining your tables to create a single query or opening another SQL Worksheet for one of the queries so that you can display the results side-by-side.
    Maybe you could explain what you're trying to do. Why are you trying to display multiple results in the same query grid?

  • Display results of MySQL query from AMFPHP by ArrayCollection in AS3 (Flash CS4)

    Hi, i am using Flash CS4 (AS3) + AMFPHP + MySQL to do own flash frontend for Wordpress CMS.  Everything is going fine but i`ve got one problem. Problem with properly display of result of query in AS3 by using ArrayCollection.
    When i check my service in "amfphp/browser/" in web browser i`ve got this (with all needed data):
    (mx.collections::ArrayCollection)#0
    filterFunction = (null)
    length = 2
    list = (mx.collections::ArrayList)#1  
    length = 2     source = (Array)#2
    That is the reason that i suppose that service work fine.  Problem is when i try to display result in AS3. In actionscript i have got this:
    function getNewsListHandler(result:Object):void{
    trace(result);
    This function displays: [object Object].
    I know that "result" is an ArrayCollection type but i don`t know how to get rows and columns from this. I know that my data is there but i have no idea how to get it.
    Clarify: I don`t know how to get to Arrays and simple data variables which are in ArrayCollection.
    Could anyone help me with that problem. I would be gratefull
    P.S. I tried also change query type in service.PHP for mysql_fetch_query but in that case i`ve got only one row (not all data).

    Thanks for fast reply,
    arr_coll:ArrayCollection = new ArrayCollection ({col1:"data1",col2:"data2"}, {col1:"data3",col2:"data4"});
    you would get the data like
    var resultstr:String = arr_coll[1][1].col2;
    trace(resultstr);
    //results in data4
    could you explain me how it was happen (arr_coll[1][1].col2)? It`s not clear to me. I thought in this case rather something like this :
    var resultstr:String = arr_coll[1]['col2'];
    It should give me "data4". I know it wasn`t but i don`t understand ArrayCollection in level which is needed to use your advice in my case. Could you clarify "arr_coll[1][1].col2" a bit?
    What would it look like when you would have something like this:
    arr_coll:ArrayCollection = new ArrayCollection ({col1:"data1",col2:"data2"}, {col1:"data3",col2:"data4"},{col1:"data5",col2:"data6"},{col1:"data7",col2:"data8"});
    and you would want know f.e. position in ArrayCollection of  "data6". How would you code this? arr_coll[1][2].col2?

  • Execute Package Task Not Working After New Installation VS2012

    After installing VS2012 Update 4, the execute package task runs the child package out of order.
    The same version of VS is being used as the old computer (same everything, SQL 2012, OS...).  The solution works correctly on machines where VS2012 was installed prior to July 2014.  I've downloaded the BIDS, SSDT.
    Anyone else have the same problem?  I have yet to find anywhere on the internet where someone has reported the same issue.  It has happened on multiple computers since August 2014.

    How to reproduce?
    It is not very likely, but did you try searching MS Connect for this issue?
    Arthur
    MyBlog
    Twitter

  • How to simply display resulting text in a dialog Box

    Is there a way to simply display resulting text in a dialog Box - not a text edit document?
    Doug_

    Thanks that's very helpful
    What I am trying to to is to create a workflow that opens mail and displays iCal TO DO's that I have created throughout the day tagged with the word MAIL so they can be filtered.
    At the moment the ACTIONS are:
    Launch Mail
    Get New Mail
    Find TO DOs in iCal (Who's SUMMERY includes MAIL)
    I get iCal To Do's as a result
    But then...I can find no options to display the iCal Events that result.
    Putting in the Applescript you posted displays a blank dialog box. This tells me that there is no text in the result.
    Yet if I put a SPEAK TEXT in after find TO DOs it dutifully speaks my filtered TO DO's
    I thought I might just try a NEW MAIL MESSAGE action.
    This works great in the workflow. The content of the new mail is the filtered TO DOs.
    But if I save it as an application (the form I need it in), mail simply opens blank when it reached that part of the work flow.
    What would you recommend?
    Thank again for your help,
    Doug_
    Message was edited by: Douglas Suiter
    Message was edited by: Douglas Suiter
    Message was edited by: Douglas Suiter

  • Display result in browser

    I need to write a java client that sends a query to server and display result in browser. I intend to call from the client the command 'cmd.exe /c start url' which will send a http request and bring up a browser for the result. But somehow if the url has more than one query argument, for example -- "http://hostname/test?node1=abc&node2=123", only everything before the "&" is taken, i.e. "http://hostname/test?node1=abc".
    Another approach would be to do it step by step, send a regular http request, either the server or the client save the result to a file, then call 'cmd.exe /c start file_location'.
    Does anyone have any better idea to work this out or why 'start url' wouldn't work? thanks.

    The command interpreter (cmd.exe) is interpreting the "&" and thus, is dropping everything after it.
    e.g. Try this from a DOS prompt:
    cls&echo hey
    You get a clear screen, with "hey" at the top, and then the prompt.
    Similarly, try this:
    cmd.exe rem hello&echo goodbye
    You get a new command prompt. Fine. Now exit that, and you get "goodbye" on the screen because that command was still queued up.
    Maybe try using the hex equivalent for the "&" character?
    Hope that sheds a little light - good luck!
    Regards,
    Nate

  • Crystal Report Takes very long time to display results

    Dear All,
    I am new to Crystal reports. We have installed Crystal report developer 2008 SP3 on Windows7 Service pack 1. We are creating reports from SAP ECC 6 EHP 4 Ready in Crystal Reports. The problem we are facing is that every report which we have developed in Crtystal reports is taking around 1 to 2 hours to display results. the reports are pertaining to only one day or one month data. we have also switch off "Verify On First Refresh", "Verify Stored Procedures On First Refresh", "Verify Database" and  we are also not saving data on report level as per the threads which are already posted in the forum pertaining to our problem.
    You are requested to kindly guide me how I can improve the performance of our crystal reports.
    Regards,
    Danish.

    You select expert formula says enough. It would appear that little or no data filtering is being carried out on the database server. Thus all records will be returned to Crystal and then filtered locally.
    You need to try and incorporate the logic of formula  {@Form_PeriodCvn} into the select expert. Or build a view/stored procedure which returns a value compatible with your filtering requirements.
    What is contents of formula  {@Form_PeriodCvn}
    Ian

  • How to display result of database query in JFrame?

    How to display result of oracle database query in JFrame?
    This is part of my code:
    String username, password;
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              OracleConnection conn = DriverManager.getConnection(String url, String username, String password);
    Statement s= conn.createStatement();
    ResultSet q= s.executeQuery("SELECT A, B, C FROM TABLE X");
    Forget what url, username & password are. Is there any problem with my code?
    What should be next if I want to display result of the query in a table in JFrame?Thx !

    How to create JTable with unknown no. of rows? How to get no. of rows of a query?
    I saw the demo of creating JTable on java.sun.com but the the table has a certain no. of rows which is not applicable to my case.
    Suppose the result of query is a table with 3 attributes so there are 3 columns in the table.
    R contains the result of the query.
    Should it be something like this if I want to create JTable of the query?
    How to make n rows of {R.getString(1),R.getString(2),R.getString(3)};?
    public SimpleTableDemo() {
    super(new GridLayout(1,0));
    String[] columnNames = {"A",
    "B",
    "C",
    while (R.next())
    // content of a row
    Object[][] data = {R.getString(1),R.getString(2),R.getString(3)};
    I can't run it because I still can't debug my code which is said before.
    Thx!

Maybe you are looking for