How to reference dynamic parameters in the PL/SQL script

The meaning of dynamic parameter is the position and name of parameters will be changed based on the data structure of a referenced text file reading by the concerned PL/SQL script. Anybody can post a sample code will be very appreciated.

The SQL and PL/SQL discussion forum is a good source for this kind of information.
The URL is:
PL/SQL

Similar Messages

  • How to have dynamic parameters with nonstandard taglib with JSTL

    Hello, I am using webwork 2.2.7, tomcat 4.1 (I have a java 1.4 requirement unfortunately), and jakarta-taglibs-standard-1.0.6 and some nonstandard taglibs and need to pass dynamic parameters to the nonstandard taglibs.
    I can see that the standard taglibs handle the ${foo} syntax for attributes but the nonstandard taglib is just getting set with "${foo}". I really need to set attributes of the nonstandard taglib with dynamic parameters. Is there some combination of c:set and the <%= syntax that can work?
    I have tried the following which does not work:
    <input:selectBox options="${accounts}"/> <!-- the nonstandard taglib just has the options property set as the literal string "${accounts}" -->
    I was thinking something like the following might work but it doesn't
    <c:set var="accounts" value="${accounts}"/> <!-- the core taglibs can deal with ${accounts} appropriately -->
    <input:selectBox options="<%=accounts=%>"/>
    I don't care how but I need to somehow access ${accounts} and set that Collection as an attribute of the taglib. Can anyone please help me solve this problem? Thank you very much.
    This is related to this thread: http://forums.sun.com/thread.jspa?threadID=5389311&tstart=0
    Joe.

    Discussion continued in [the original thread|http://forums.sun.com/thread.jspa?threadID=5389311&tstart=0].
    May as well keep it all together.

  • How to get two parameters in the same line of selection screen?

    hello
    i need to get my selection csreen like bellow.
    r1 radiobuttion  -some space --p1 parameter
    i should not get the parameter in the next line of  radiobuttion.
    how to get two parameters in the same line of selection screen?

    hi....
    modify the following code
    it will work
    SELECTION-SCREEN BEGIN OF BLOCK SL1 WITH FRAME TITLE TEXT-003.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) TEXT-001
                     FOR FIELD P1.
    SELECTION-SCREEN POSITION POS_LOW.
    PARAMETERS : P1 TYPE   C USER-COMMAND R2 RADIOBUTTON GROUP R2 DEFAULT 'X',
      P2 TYPE SCARR-CARRNAME,
      P3 TYPE CHAR1 RADIOBUTTON GROUP R2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK SL1.

  • Reference additional parameters via the URL

    Is it possible to reference additional parameters via the URL?
    I would like to be able to reference the value of CUSTOM_PARAM in the following simple example
    f?p=4000:1500:3712511906556636:::RP::&CUSTOM_PARAM=12345

    Hello Craig,
    I dont know if you already solved the problem but as you probably noticed I had the same, if you are running on a remote host with minimum privileges this is simply not possible but if you have your personal server and database this is the solution to go(thanks to your idea).
    create or replace procedure APEX_040000.f2(
    P in varchar2,
    P_SEP in varchar2 default null,
    P_TRACE in varchar2 default null,
    C in varchar2 default null,
    PG_MIN_ROW in varchar2 default null,
    PG_MAX_ROWS in varchar2 default null,
    PG_ROWS_FETCHED in varchar2 default null,
    FSP_REGION_ID in varchar2 default null,
    SUCCESS_MSG in varchar2 default null,
    NOTIFICATION_MSG in varchar2 default null,
    CS in varchar2 default null,
    S in varchar2 default null,
    TZ in varchar2 default null,
    P_LANG in varchar2 default null,
    P_TERRITORY in varchar2 default null,
    code in varchar2 default null, <-- Custom variable
    error_reason in varchar2 default null, <-- Custom variable
    error in varchar2 default null <-- Custom variable
    +) is+
    begin
    --write your code here+
    APEX_040000.f(P => P,P_SEP => P_SEP, P_TRACE => P_TRACE,C => C, PG_MIN_ROW => PG_MIN_ROW, PG_MAX_ROWS => PG_MAX_ROWS, PG_ROWS_FETCHED => PG_ROWS_FETCHED, FSP_REGION_ID => FSP_REGION_ID, SUCCESS_MSG => SUCCESS_MSG, NOTIFICATION_MSG => NOTIFICATION_MSG, CS => CS, S => S,TZ => TZ,P_LANG => P_LANG,P_TERRITORY  =>  P_TERRITORY);
    end f2;
    Then it is important to indeed grant public access to it with:
    grant execute on APEX_040000.f2 to public;
    Now here comes to part that actually does it and where the right privileges are needed.
    create or replace public synonym f for APEX_040000.f2;
    Overloading the F procedure didnt work for some reason, probably because F is a wrapped procedure.
    But this worked perfect !!!

  • How can I extract the full SQL script for a schema?

    Hi,
    How can I extract the full SQL script for a schema?
    I am looking for some method that needs jus SQL*Plus and preferably doesn’t need any extra tool.
    Thank you,
    Alan

    How can I extract the full SQL script for a schema?What are you looking for? PL/SQL code? DDL for objects?

  • Running the same sql script in multiple databases

    Hello,
    What is the method to run the same sql script in multiple databases? I want to write a unix script that would select from different databases and run a sql/plsql script in those different databases. What are the ways to write such a unix script? Thank you in advance.

    Just have a parameter which takes in the oracle connection parameters and use it in your sqlplus script with your shell script.
    Your sqlplus script can have a procedure/function call or an anonymous block;
    Then have a wrapper script to call the original script with different connection parameters. Hope this helps.

  • Where is the KGLR.SQL script?

    Does any know where the kglr.sql script is located? Oracle references it in the ora-04052 error message.

    Here are some notes from the Recovery Manager Users Guide and Reference:
    The create catalog command (see "createCatalog" on page 10-59) creates the recovery catalog. It replaces catrman.sql and associated scripts in the
    dbs/admin directory.
    To create an 8.1.6 catalog that is backwards compatible with pre-8.1.6 RMAN executables, you must issue create catalog with the older RMAN version first(or run catrman.sql if using a pre-8.1.5 release), and then execute upgrade catalog with the 8.1.6 RMAN.
    Note: In releases prior to 8.1.5, you created the recovery catalog schema by connecting to the recovery catalog database and executing the catrman.sql script.

  • Where is the catrman.sql script ?

    Hello,
    I have created the rman user in a new database and now want to execute the catrman.sql script.
    But it's not in the default location
    @ORACLE_HOME/rdbms/admin nor everywhere on my harddrive.
    I need it to have a Recovery-Katalog.
    Thanks

    Here are some notes from the Recovery Manager Users Guide and Reference:
    The create catalog command (see "createCatalog" on page 10-59) creates the recovery catalog. It replaces catrman.sql and associated scripts in the
    dbs/admin directory.
    To create an 8.1.6 catalog that is backwards compatible with pre-8.1.6 RMAN executables, you must issue create catalog with the older RMAN version first(or run catrman.sql if using a pre-8.1.5 release), and then execute upgrade catalog with the 8.1.6 RMAN.
    Note: In releases prior to 8.1.5, you created the recovery catalog schema by connecting to the recovery catalog database and executing the catrman.sql script.

  • How to create Dynamic Parameters for between dates

    Hi,
    I have a requirement to create a crystal report with between dates using dynamic parameters.
    I am getting data from 'BEx Query' where already filters were defined on Date field. So While I am creating a crystal report these filters are displaying under 'Parameter Fields' automatically as Static. When I execute the report I am getting these Date's as Dropdown box. But as per the 'help' in crystal reports, static values won't get updated if any changes were taken place in backend system.
    I have created a Dynamic parameter 'StartDate', but the values are not getting populated in Dropdown box.
    Please let me know how to achieve this requirement.
    Thanks in advance.
    cheers
    dev

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with your directly

  • How to set dynamic name of the mail attachment according to source file ?

    Hi,gurus:
    Our scenario is like below:
    Sending files from an FTP server to another FTP server without using the integraiton repositary,and the file name is not changed .Now, we want to also send the file to some with by mail adapter.The scenario  now works by using two business services in receiver determination.But the name of the attachment is "untitled.xml".We know how to set the file name staticly,but how to set the name dynamicly according to the source file name ?
    I have checked miachel's blog "XI: Dynamic name in the mail attachment - pseudo "variable substitution"(/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution),but how can I get the source file name?
    And another question:Must we restart the adapter or j2ee engine to make the user defined module work?

    Hi,
    >>>but how can I get the source file name?
    form dynamicconfiguration (ASMA)
    >>>And another question:Must we restart the adapter or j2ee engine to make the user defined module work?
    no need for a restart
    Regards,
    Michal Krawczyk

  • How to reference a file with the XML Forms Builder?

    Hello,
    I've created a form at the XML Form builder (I am using NW 04). This enables the users to create new topic.
    I've created at at the "Edit" form an option to upload a file along with the new topic. The file is being saved in a subfolder of the topics main folder.
    My question is how to create a link to the specific file that has been uploaded with it's specific topic at the "Show" Form? Note that the subfolder contains files of many topics, I want to link to this specific file uploaded with it's relevant topic when created. How do I do that?

    Hi Roy,
    > I've created at the "Edit" form an option
    > to upload a file along with the new topic.
    What I expect that you have done is to add a browse functionality which browses within KM with the possibility to upload an image into KM?! As done within SAP Demo News?!
    If that's the way, just compare the SAP Demo News: Create /DataSchema/News/image and map it to the browser, whereas in the show form part you'll map it to an image.
    If I didn't understand you right and the issue is still open, please report...
    Hope it helps
    Detlev

  • How to reference LEVEL in a TREE's SQL code

    Is it possible to somehow reference LEVEL in a tree's sql code so that you can use a decode statement to selectively create links on specific levels only i.e. NOT on the root level?
    e.g.
    select "CHILD_ID" id,
    "PARENT_ID" pid,
    "NAME" name,
    decode( LEVEL, 1, null,'f?p=' || :APP_ID || ':43:' || :APP_SESSION || '::::P43_CHILD_ID:' || CHILD_ID) link,
    null a1,
    null a2
    from TREETABLE
    order by name
    one solution I've implemented is to create a DB function e.g.
    create or replace function get_tree_level(v_child_id number) return number
    is
    v_level number(2);
    begin
    select level
    into v_level
    from TREETABLE
    where child_id=v_child_id
    start with child_id=1
    connect by prior child_id= parent_id;
    return v_level;
    end;
    and then use
    decode( get_tree_level(child_id) 1, null,'f?p=' || :APP_ID || ':43:' || :APP_SESSION || '::::P43_CHILD_ID:' || CHILD_ID) link,
    but this is too slow as I have quite a few records in the tree and takes too long to render
    regards
    Paul P

    OK I found a workaround after reading
    How to add URL to tree
    The view my tree is build on is constructed out of 3 unions and 4 "selects" ( the first select creates the ROOT NODE where "1" is also used as a hard coded foreign key (Parent_id), in the company table.)
    I just added a new column called tree_level to the query which is hard coded wrt its level on the hierarchy.
    e.g.
    CREATE OR REPLACE FORCE VIEW COMCONSTUTREE ("CHILD_ID", "PARENT_ID", "NAME","TREE_LEVEL") AS
    select 1 as child_id,to_number(null) as parent_id ,'Company' as name,*1 as tree_level* from dual
    UNION
    select COM_ID, 1, COM_NAME,2
    from company
    UNION
    select CON_ID,CON_COMPANY_ID, substr(con_name,instr(con_name,' ')+1) ||', '||substr(con_name,1,instr(con_name,' ')-1),3
    from contact
    UNION
    select STU_ID,STU_CONTACT_ID, STU_LAST_NAME||', '||STU_FIRST_NAME ,4
    from student;
    the tree code now becomes
    select "CHILD_ID" id,
    "PARENT_ID" pid,
    "NAME" name,
    decode( tree_level,1, null,'f?p=' || :APP_ID || ':43:' || :APP_SESSION || ':TREE:::P43_CHILD_ID:' ||CHILD_ID) link,
    null a1,
    null a2
    from COMCONSTUTREE"
    order by name

  • How to create dynamic HTML page using PL/SQL code in APEX.

    hello,
    I am woking on one APEX application in which i want to create one dynamic HTML page on button press using PL/SQL code.
    Thanks

    It is possible to create HTML page with dynamic content. One way would be creating hidden field (e.g. P1_HTML on page 1) with dynamic HTML and on button click you redirect to page 2 and pass P1_HTML item value to item P2_HTML on page 2. On page you must have PL/SQL region. You can then render your dynamic HTML with code:
    htp.p(:P2_HTML);
    Don use APEX URL for passing HTML value. Problem and solution is described here: http://blog.trent-schafer.com/2011/04/03/dont-pass-string-parameters-in-the-url-in-apex-its-a-bad-idea/
    Edited by: MiroMas on 3.2.2012 3:20

  • Dynamic table in a pl/sql script

    Hi everybody
    how can I design a sql query in a pl/sql script when the table I want to access is built dynamically ?
    for instance
    select to_char(sysdate,'MON')
    into v_month
    select * from table_'v_month' --> this is not working
    Thanks for your replies
    Alain

    You will need to use dynamic sql to create a sql statement in PL/SQL.
    If you have 8.1.x, you can use EXECUTE IMMEDIATE. You would need to have something like this in you proc.
    SELECT TO_CHAR(sysdate,'MON')
    INTO v_month;
    tname:= 'table_'||v_month;
    sqlstr := 'SELECT * FROM '||tname;
    EXECUTE IMMEDIATE sqlstr;If you have 8.0.x or less, you will need to use the DBMS_SQL package. This is a little more complicated because you need to do a few more steps, but the principle is similar.
    You can see how to use dynamic sql in the PL/SQL manuals, and in the Application Developer guide.

  • How to hide dynamic parameters values in the URL with Reports 6i

    Hi,
    I want to know a way of hiding the parameters values when asking for a report through the web.
    Now I'm using the Reports 3.0.5.8 with a Cartridge defined in the Oracle Web Application Server 3.0.1.0.1. When you ask for a report with the parameters DESTYPE = cache and DESFORMAT = pdf, it is fully generated and in the Address or Location box of the browser, you can see http://webserver/cache/report.pdf (where cache is the virtual directory defined in the OWAS in which the .pdfs are cached). So, users cant see the Url used to generate the report.
    Im trying to upgrade this configuration to Reports 6i with Cgi in a web server. I generate reports with no problems. The problem I have is I cant find how to hide the parameters values as before. I mean, when I ask for a report, once its generated I can see http://webserver/cgi-bin/rwcgi60.exe?server=ServerName&report=report.rdf&userid=user/pass@connection&destype=cache&desformat=pdf&P1=value1&P2=value2 in the Location box. It allows user to ask for another report changing the values of the parameters. I use these parameters to execute some query written in the Data Model. For example, imagine that the P1 represents the company id, the user (that is supposed to see only data of its company) can change this id, ask for a new report and see data of another company.
    Ive already tried to use the key mapping option, but its not useful to me because the parameters values are dynamic and its impossible to define different entries in the cgicmd.dat for each possible value. The option of loading the parameter form before running a report is not useful to me either, because there exists specific screens for this purpose.
    Is there any solution?
    Thank you.
    Marma Bonfiglio.

    Hi Rakesh,
      I am using BI  7.0
    The last option I have is 'Hide' for 'Calculate single values as' .
    I have the below options  for 'Calculate single values as'
    1. Normalise  according to Next group  level  Resul.
    2. Normalize according to  Overall Result
    3. Rank number
    4.Olympic Rank Number
    5.Maximum
    6. Minimum
    7.Counter for all detailed values
    8.Counter for all detailed values that are non zero
    9.Moving average
    10.Moving average  That is  Not zero ,null or Error
    11. Hide.
    So could you please tell me where i can find 'suppress result' option for the keyfigure .
    Many thanks

Maybe you are looking for