How to pass parameter in sql developer for debubing record type

DECLARE
  IB_BP_BANK_ACCOUNT_BUF PL/SQL RECORD;  ---record type
  IP_BP_ID NUMBER;
  IOP_ACC_SEQ_NO NUMBER;
  OP_ERROR VARCHAR2(200);
BEGIN
  IB_BP_BANK_ACCOUNT_BUF := NULL;
  IP_BP_ID := NULL;
  IOP_ACC_SEQ_NO := NULL;
  ORAGTW11.MAINTAIN_BP_BANK(
    IB_BP_BANK_ACCOUNT_BUF => IB_BP_BANK_ACCOUNT_BUF,
    IP_BP_ID => IP_BP_ID,
    IOP_ACC_SEQ_NO => IOP_ACC_SEQ_NO,
    OP_ERROR => OP_ERROR
  /* Legacy output:
DBMS_OUTPUT.PUT_LINE('IOP_ACC_SEQ_NO = ' || IOP_ACC_SEQ_NO);
  :IOP_ACC_SEQ_NO := IOP_ACC_SEQ_NO;
  /* Legacy output:
DBMS_OUTPUT.PUT_LINE('OP_ERROR = ' || OP_ERROR);
  :OP_ERROR := OP_ERROR;
END;

Something like this:
Assuming you have a procedure like this:
CREATE OR REPLACE PROCEDURE abc (p_emp emp%ROWTYPE)
IS
BEGIN
   DBMS_OUTPUT.put_line (p_emp.empno);
END;
Then you have to call it from a PL/SQL Block in this way i.e.:
DECLARE
  v_emp emp%ROWTYPE;
BEGIN
  SELECT *
    INTO v_emp
    FROM emp
   WHERE ROWNUM<=1;
   abc(v_emp);
END;
Regards.
Al

Similar Messages

  • How to start listener in sql developer for remote debug

    how to start listener in sql developer for remote debug ? Since the new version 1.1.0.23 is different with the old version for remote debug, I don't know how to start the listener on the new version for remote debug.
    even follow the user guide below and not work . Experts on sql developer please help me with this.
    Remote Debugging
    To debug a procedure or function for a connection where the database is on a different host than the one on which you are
    running SQL Developer, you can perform remote debugging.
    Remote debugging involves many of the steps as for local debugging; however, do the
    following before you start the remote debugging: Use an Oracle client such as SQL*Plus to issue the debugger connection command. Whatever
    client you use, make sure that the session which issues the debugger connection commands is the same session which executes your PL/SQL
    program containing the breakpoints.
    For example, if the name of the remote system is remote1, use the following SQL*Plus command to open a
    TCP/IP connection to that system and the port for the JDWP session:
    EXEC DBMS_DEBUG_JDWP.CONNECT_TCP('remote1', '4000'); The first parameter
    is the IP address or host name of the remote system, and the second parameter is the port number on that remote system on which the debugger
    is listening.
    Right-click the connection for the remote database, select Remote Debug, and complete the information in the Debugger - Attach
    to JPDA dialog box. Then, follow the steps that you would for local debugging (for example, see Debugging a PL/SQL Procedure).
    Debugger - Attach to JPDA This dialog box is displayed when you right-click a database connection name and select Remote Debug.
    Use this
    dialog box if you are using the Sun Microsystem's Java Platform Debugger Architecture (JPDA) and you would like the debugger to listen so
    that a debuggee can attach to the debugger.
    For more information about remote debugging, see Remote Debugging.
    Host: Name or IP address of
    the remote host on which SQL Developer should listen for the database to connect.
    Port: Listening port number on the remote host. You can
    choose any valid port number that is not in use by another process.
    Timeout: The number of seconds that SQL Developer will wait for the
    remote database to make a debugging connection. Don't Show Dialog Box Before Connecting: If this option is checked, this dialog box will not
    be displayed before future connections for remote debugging

    You're not the only one:
    Not able to start remote debug listener
    Re: remote debug question at version 1.1.0.23 64

  • How to pass parameter into extract function (for XMLTYPE)

    I have a table PROBLEMXML with XMLTYPE field xml_column. In this column there are several deffinitions for the problem. There is no max amount of deffinitions and it can be no definition at all. I need to return all definitions for every problem as a string wirh definitions separated by ";".
    Query
    SELECT extract(prob.Def,'/Definitions/Definition[1]/@var') || ';'|| extract(prob.Def,'/Definitions/Definition[2]/@var')
    FROM PROBLEMXML j ,
    XMLTABLE (
    '/problem'
    PASSING j.xml_column
    COLUMNS probid VARCHAR (31) PATH '/problem/@id',
    Def XMLTYPE PATH '/problem/Definitions') prob
    where PROBLEM_ID =1;
    returns exactly what I want a;m.
    But
    declare
    my_var varchar2(2000) :=null;
    n1 number;
    n2 number;
    begin
    n1:=1;
    n2:=2;
    SELECT extract(prob.Def,'/Definitions/Definition[n1]/@var') || '|'|| extract(prob.Def,'/Definitions/Definition[n2]/@var') into my_var
    FROM ETL_PROBLEMXML_STG_T j ,
    XMLTABLE (
    '/problem'
    PASSING j.xml_column
    COLUMNS probid VARCHAR (31) PATH '/problem/@id',
    Def XMLTYPE PATH '/problem/Definitions') prob
    where PROBLEM_ID =1;
    dbms_output.put_line(my_var);
    end;
    returns NULL.
    Is there is a way to pass parameter into extract function?

    I need to return all definitions for every problem as a string wirh definitions separated by ";".In XQuery, there's the handy function "string-join" for that.
    For example :
    SQL> WITH etl_problemxml_stg_t AS (
      2   SELECT 1 problem_id,
      3  xmltype('<problem id="1">
      4   <Definitions>
      5    <Definition var="var1"></Definition>
      6    <Definition var="var2"></Definition>
      7    <Definition var="var3"></Definition>
      8   </Definitions>
      9  </problem>') xml_column
    10   FROM dual
    11  )
    12  SELECT j.problem_id,
    13         prob.probid,
    14         prob.def
    15  FROM etl_problemxml_stg_t j,
    16       XMLTable(
    17        'for $i in /problem
    18         return element r
    19         {
    20          $i/@id,
    21          element d { string-join($i/Definitions/Definition/@var, ";") }
    22         }'
    23        passing j.xml_column
    24        columns
    25         probid varchar2(30)  path '@id',
    26         def    varchar2(100) path 'd'
    27       ) prob
    28  ;
    PROBLEM_ID PROBID               DEF
             1 1                    var1;var2;var3

  • How to pass parameter to a report for Operator 'LIKE'

    I need to pass a parameter to a report for "LIKE" operator. the parameter for "equal to or is in" operator is 'eq':
    'https://secure-ausomxfts.crmondemand.com/OnDemand/user/analytics/saw.dll?Go&Path=/shared/Company_AFTA-D78SR_Shared_Folder/Work Order Asset Lookup&Options=r&Action=Navigate&P0=2&P1=eq&P2=Account.TEXT_61&P3=&p4=
    What would 'p1' value for 'LIKE' operator?
    Thanks

    Hi, Hope the below helps
    neq - Not equal to or not in
    lt - Less than
    gt - Greater than
    ge - Greater than or equal to
    le - Less than or equal to
    bwith - Begins with
    ewith - Ends with
    cany - Contains any (of the values in &P3)
    call - Contains all (of the values in &P3)
    like - Is like (Type %25 rather than the % wildcard)
    top - In the top n (&P3 contains 1+n, where n is the number of top items)
    bottom - In the bottom n (&P3 contains 1+n, where n is the number of bottom
    items)
    bet - Between (&P3 must have two values)
    null - Is null (&P3 must be 0 or omitted)
    nnul - Is not null (&P3 must be 0 or omitted)
    Venky CRMIT

  • How to pass parameter into sql block?

    example code
    @script.sql a b c d
    Inside script
    DECLARE
    cursor cur is select col1 from table where col1 in ('a','b','c','d','e');
    BEGIN
    END;
    Not sure 1) The the total number of parameters will be passed at run time
    2) Not sure of case, could be lower upper or both....
    Please help...

    do you have different queries which are defined to use different numbers of parameters, OR (more likely) sometimes you just want to pass less parameters?
    sqlplus / @file1 "a" "b" "" "" ""
    now I only passed 2 "real" params, and 3 blanks. that way, sqlplus still has the values of &3 - &5 defined, and everything works fine. you'lll need either single or double quotes (or perhaps single quotes within double quotes) depending on your os, version, etc.

  • Passing Parameter in SQL

    How to Passing parameter in SQL.For Example,Table name=&From_Clause.It will asking table name at runtime.How to assign table name based on user.

    Hi,
    796776 wrote:
    It will returm error.what problem in this
    Select * From Emp a,
    (SELECT CASE
    WHEN USER = :UserType
    THEN 'scott.Dept'
    ELSE 'scott.order'
    END AS b
    FROM dual)
    Where a.DeptNo= b.DeptNo &WhereClauseIt's hard to guess, from an example like this with so many errors, exactly what you're trying to do.
    Please post a description of the problem, including CREATE TABLE and INSERT statments for any tables you need (unless you can state the problem using commonly available tables, such as those in the data dictionary or the scott schema), a few values of a parameter (or examples of different user names, if USER acts like a parameter) and the results you want from the same data for each value.
    For example
    "In addition to the scott.dept table, I have a table called my_dept: CREATE TABLE my_dept ...
    which has this data: INSERT INTO my_dept ...
    I need a script such that, when user scott runs it, the results are ...
    but when any other user runs it, the results are ..
    As you can see, the difference is ..."
    Table names must be explicitly given when a SQL statement is compiled. That's why I usggested a preliminary query; so by the time you compiled the main query, the table name would be known and could be passed in a substitution variable.
    If you really want to do it in one query, you can do a UNION of two queries, one of which returns nothing because of the parameter. It's not very efficient.

  • How to pass parameter to the Query String of the Named Queries'SQL

    Firstly to say sorry,I'm a beginner and my English is very little.
    Now I want to know
    How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
    Thanks.

    benzi,
    Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    Also see section 5.9 and chapter 18 in the developer's guide.
    thanks

  • How to pass parameter to pl/sql block

    Hi,
    I am getting following error when trying to create staging table from shell script by passing parameter.
    SQL*Loader-941: Error during describe of table T1_1DAY_STG
    ORA-04043: object T1_1DAY_STG does not existThis is PL/SQL block being called inside shell script
    begin
    execute immediate 'create table t1_&1._stg as select * from t1_rpt_tmt';
    endShell Script Call
    load_data_to_oracle()
    for i in 1DAY 7DAY 15DAY
    do
    ${ORACLE_HOME}/bin/sqlplus ${ORACLE_USER}/${ORACLE_PASSWD}@${ORACLE_SID} << EOF > ${TMP_LOG_FILE} 2>&1
    set serveroutput on
    @${CREATE_STAGE_SQL} "$i"
    COMMIT;
    QUIT;
    EOF
    ########Main#######
    load_data_to_oraclethanks
    sandy

    i dont understand why you want run it from shell script. you can write procedure like this :
    SQL>
    SQL> CREATE OR REPLACE PROCEDURE mytestProc(p_in VARCHAR2) AS
      2  begin
      3    FOR i IN (select REGEXP_SUBSTR(p_in,'[^,]+',1,ROWNUM) tblName
      4                from dual
      5                CONNECT BY INSTR(p_in, ',', 1, level - 1) > 0)
      6    LOOP
      7      execute immediate 'create table t1_'||i.tblname||'_stg as select * from myt2';
      8    END LOOP;
      9  end;
    10  /
    Procedure createdand run it
    SQL> exec mytestProc('1day,7day,15day');
    PL/SQL procedure successfully completed
    SQL> select * from t1_15day_stg
      2  union all
      3  select * from t1_1day_stg
      4  union all
      5  select * from t1_7day_stg;
    T                  N
    SQL>
    SQL> drop table t1_15day_stg;
    Table dropped
    SQL> drop table t1_1day_stg;
    Table dropped
    SQL> drop table t1_7day_stg;
    Table dropped
    SQL> purge table t1_15day_stg;
    Done
    SQL> purge table t1_1day_stg;
    Done
    SQL> purge table t1_7day_stg;
    Done
    SQL>

  • How to Pass parameter to Custom Scheduler dynamically

    hi ,
    I am new to OIM.
    Need your help in passing parameters dynamically to Custom Scheduler.
    I have created Custom Scheduler by extending Task Support.
    I have registered the plugin through API , using PlatformService.registerPlugin() method.
    As I need to send the parameter(s) to this CustomScheduler, I have defined them in Metadata (CustomScheduleTask.xml) file as below and got it imported into DB
    through weblogicImportMetadata.sh script by providing the path of the file.
    <scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
    <task>
    <name>CustomScheduleTask</name>
    <class>org.schedule.custom.task.CustomScheduleTask</class>
    <description>Fetch details of the given user_id</description>
    <retry>5</retry>
    <parameters>
    <string-param required="true" helpText="Login Name">Login Name</string-param>
    </parameters>
    </task>
    </scheduledTasks>
    Iam able to import this plugin as well as register the plugin successfully. Now I have defined a job to which this Custom SchedulerTask is mapped.
    Now in order to run this job(schedule task) I need to provide Login name( or id) which needs to be send as a parameter for the scheduler to get executed.
    But while defining the job with this Schedule Task on OIM console, I was not able to define or pass parameter to this job. hence parameter is null in
    CustomSchedule 's execute method .
    Kindly help me how to pass parameter dynamically while running the scheduler from OIM console so that the execute method would be able to receive it.
    Thank you in Advance.
    Regards,
    Kumar

    Hi,
    When you have created the schedule job for your custom schedule task, you should see your Login Name textfield in the schedule task. If not, then there verify your schedule task xml.
    In your schedule class code, add:
    public void execute(HashMap arg0) {
              final String METHOD_NAME = "execute :: ";
              logger.debug(CLASS_NAME + METHOD_NAME + "Entering Method - execute");
              try {
                   String LoginName = arg0.get("Login Name");
    Regards,
    Sunny

  • How to pass more than one value for one column in procedure

    hi
    select id, name from col_tab where dept_name in ('ECE','CIVIL');
    when i was running this it is working well.
    CREATE OR REPLACE PACKAGE pack_str
    AS
    TYPE type_refcur IS REF CURSOR;
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
    IS
    BEGIN
    OPEN ans FOR
    select id,name from col_tab where dept_name in char_in ;
    END str;
    END pack_str;
    the package was created.
    my doubt is
    1.how to pass more than one value for char_in (e.g ('ECE','CIVIL'))
    2. when i was storing the value in string like val = 'ECE,CIVIL' ,
    how to get the id,name for ECE and CIVIL.
    plz help me

    Hi Rebekh ,
    I am recreating your packages for the desired output.
    CREATE OR REPLACE PACKAGE pack_str
    AS
         TYPE type_refcur IS REF CURSOR;
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
         IS
              lv_t varchar2(200);
         BEGIN
              lv_t := REPLACE(char_in,',',''',''');
              lv_t := 'select id,name from col_tab where dept_name in (''' || lv_t || ''')' ;
              OPEN ans FOR lv_t;
         END str;
    END pack_str;
    Note:-
    Input Parameter char_in is a comma seperated value for dept_name
    -Debamalya

  • How to pass parameter as http POST in pageContext.setForwardURL

    Hi,
    I need to call a third party application page in my custom OAF page. I need to pass parameter to this third party page using POST method. I am using following command to call that -
    HashMap hm = new HashMap();
    hm.put("FirstName",firstName );
    hm.put("LastName",lastName);
    hm.put("AppSignature", signature);
    pageContext.setForwardURL(hopURL,
    null, // not necessary with KEEP_MENU_CONTEXT
    OAWebBeanConstants.KEEP_MENU_CONTEXT, // no change to menu context
    null, // No need to specify since we're keeping menu context
    hm, // request parameters
    false, // retain the root application module
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // display breadcrumbs
    OAException.ERROR);
    I am passing parameter to the page using hash map table. That application is expecting the parameters in POST format and I believe using hash map table the parameters will be passed as GET format.
    We figured that out because one of the parameter we have to send is AppSignature which is 160 characters long. When third party applicatoin received that parameter they got only 151 characters, looks like they are truncated by GET method.
    Any idea how to pass parameter using POST format so that this issue could be fixed.
    Regards
    Hitesh

    Sumit,
    Thanks for your reply. I have resolved this issue by forwarding all parameters in session using pageContext.putSessionValueDirect and redirect to a jsp using pageContext.redirectImmediately.
    in jsp I read the params from session and set in the form , and then redirected to my third party application.
    Regards
    Hitesh

  • How to pass parameter /1BCDWB/DOCPARAMS from webdynpro?

    Hi Experts,
    We create a wdp view and indert an adobe form into it. And this form has an interface based on XML schema.
    Now we want to translate this form into multi-language, and in wdp side, we will display diffenent language version of form for different regions.
    I found that there is a paramater /1BCDWB/DOCPARAMS-LANGU, and it seems can control the language version in processing.
    But I donot know how to pass parameter /1BCDWB/DOCPARAMS from wdp to adobe form.
    Its my 1st to use adobe form and wdp, i really have no way out. Any advice will be Appreciated.
    Thank you.
    Richard

    @sahai: Hey no , I am using very very simple example without any query or complex statement. I just have 2 radio buttons in VIEW1. On clicking the radio button, the naviagtion to view2 is done and the value of selected radio button is passed as a parameter in the plug.
    In the view2 , i just have a caption in my layout where i am displaying the parameter value by setting the attribute.THe warning i get is in view2. Here is the code. Apart from this there is no coding in view2.
    METHOD HANDLEPLUG_IN_V2 .
        DATA:
          NODE_CAPT_MSG                       TYPE REF TO IF_WD_CONTEXT_NODE,
          ELEM_CAPT_MSG                       TYPE REF TO IF_WD_CONTEXT_ELEMENT,
          STRU_CAPT_MSG                       TYPE IF_VIEW2=>ELEMENT_CAPT_MSG ,
          ITEM_MSG                            LIKE STRU_CAPT_MSG-MSG.
    *   navigate from <CONTEXT> to <CAPT_MSG> via lead selection
        NODE_CAPT_MSG = WD_CONTEXT->GET_CHILD_NODE( NAME = `CAPT_MSG` ).
    *   get single attribute
        NODE_CAPT_MSG->SET_ATTRIBUTE(
          EXPORTING
            NAME =  `MSG`
            VALUE = PAR_1 ).
    ENDMETHOD.

  • How to pass parameter into transaction iview ?

    Hi experts,
    I want to know "how to pass parameter into transaction iview ".
    Regards,
    Krishna Balaji T

    Hi Krishna,
    Not sure if this can help you.
    1) Passing a parameter to a transaction iview (I saw a resolved suggestion)
    Passing a parameter to a transaction iview
    2) Passing a parameter from the portal to R3 (helpful info for you)
    Passing a parameter from the portal to R3
    3) Create SAP Transaction iView using SAPGUI for Windows (Great Blog and info about TA Iview)
    Create SAP Transaction iView using SAPGUI for Windows
    Please check the following link for Transaction Iviews
    http://help.sap.com/saphelp_nw2004s/helpdata/en/02/f9e1ac7da0ee4587d79e8de7584966/frameset.htm
    Just some info: Portal is basically what the end user can see. What he can do, is still maintain in the backend system. If there are parameters setup already for the user in the backend system (in SU01), then those parameters should still valid for the transaction that the parameters are linked to.
    Hope that helps and award points for helpful suggestions.
    Ray

  • How to do profiling in sql developer?

    how to do profiling in sql developer?
    also-can somebody plz suggest a gud site for information on pl/sql code profiling.

    You might want to ask your SQL Developer-related question in the SQL Developer forum: SQL Developer
    gud site for information on pl/sql code profiling.Online Oracle Documentation:
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/tuning.htm#LNPLS01214
    and/or
    http://www.oracle-base.com/articles/9i/DBMS_PROFILER.php
    Edited by: hoek on May 19, 2010 12:55 PM

  • To find last updated date in sql developer for a procedure or a function

    hi
    how to to find last updated date in sql developer for a procedure or a function.
    i m using sql developer version in 1.2

    I think you are in the wrong forum...
    Anyway you can try
    select * from
    all_objects o
    where o.object_type in ('FUNCTION','PROCEDURE');
    you have there the created date, last DDL and timestamp

Maybe you are looking for