Usage of Lexical Parameters in PL/SQL code

Hello Everyone,
I am trying to use a query in the pl/sql code which has 9 parameters ( Earlier this query was used in a Report i.e. report6i , so we used the lexical parameter to handle the parameters). But according to our new requirement i have to use this query with the same set of parameters in a PL/SQL code.
To be more specific of the 9 input parameters to the report one of the parameter is order_date_from and order_date_to. the possibilities are like
order_date_from = null and order_date_to = null
order_date_from = not null (some value) and order_date_to = null
order_date_from = null and order_date_to = not null (some value)
order_date_from = not null (some value) and order_date_to =not null (some value)
these above four possibilities are for one lexical parameter (say) like this i have six more combinations.
Since PL/SQL doesnt support any lexical parameters do i have any other way to handle this situation ?? Any help is greatly appreciated.
Thanks
Tarun

If your columns are named order_date_from and order_date_to and your corresponding parameters are named p_order_date_from and p_order_date_to then you can go with the following approach.
WHERE order_date_from = NVL(p_order_date_from, order_date_from)
   AND order_date_to = NVL(p_order_date_to, order_date_to)Message was edited by:
scott.swank

Similar Messages

  • How to use lexical parameters with Sql Server Stored Procedure?

    Hi,
    I'm developing a BI Publisher report on a sql server database. I need to execute a stored procedure to dynamically build the query by replacing the lexical parameters with the values of varaibles of the stored procedure. With Oracle stored procedures, I have used data template and had reference the varaiable in SP by prefixing it with '&'.
    It doesn't work if I try to do the same thing with SQL server. Is there anyone who has come across the similar situation? Please let me know if anyone has got any ideas...
    Thanks in Advance
    Rag

    TopLink currently doesn't support multiple ResultSets. Multiple ResultSets support is considered for a future release.

  • Help desiging a 10g Oracle Report with Matrix and Lexical Parameters - Long

    Hello all:
    I apologize in advance for this long post.... I'm using Oracle Reports 10g (9.0.4.0.33). First -- the question:
    I need to create a Matrix where the rows come from one database table
    (TABLE1) and the columns and cell contents come from a linked query (pulled from TABLE2) that is generated with lexical parameters based on the current TABLE1 row. The lexical parameters contain a WHERE clause for the TABLE2 query. Basically, I have a linked query between TABLE1 and TABLE2. I need to generate a Matrix around it.
    Does anyone know if this is even possible?
    Here's the background on the application, if that is helpful...
    I have an application where I maintain database tables containing names/addresses along with information pertaining to them. As part of the processing, I need to produce reports that contain statistics based on values in the table. For example, each row has a field RTYPE that identifies the Record Type (1-Suppress, 2-Buyer, 3-Inquirer). Each row also has a last purchase date field. The statistics produced for this field would look like this:
              2001     2002     2003     11/03     12/03 01/04     02/04 03/04     04/04     05/04 ...
    Buyer      100 150 250 30 25 15 8 9 22 83
    Inquirer     1000 800 493 ...
    Suppress ... ...
    Totals ... ...
    Each cell contains the count of the number of records that have the corresponding RTYPE and Last Purchase date. The dates across the top are determined by the most recent purchase date in the file. We count the last 12 months, month by month, and then anything older than that is grouped by
    year of purchase. So, the column headings are variable.
    The SQL query for this example looks like this:
    SELECT CASE WHEN rtype = '2' THEN 'Buyers'
    WHEN rtype = '3' THEN 'Inquirers'
    WHEN rtype = '1' THEN 'Suppress'
    END HLDESC,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'YYYYMM')
    ELSE TO_CHAR(T.HOTLINE,'YYYY') || '00'
    END YYMM_8,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'MM/YY')
    ELSE TO_CHAR(T.HOTLINE, 'YYYY')
    END FmtDate_8,
    COUNT(*) HLCOUNT
    FROM &TABLENAME T
    GROUP BY CASE WHEN rtype = '2' THEN 'Buyers'
    WHEN rtype = '3' THEN 'Inquirers'
    WHEN rtype = '1' THEN 'Suppress'
    END,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'YYYYMM')
    ELSE TO_CHAR(T.HOTLINE,'YYYY') || '00'
    END,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'MM/YY')
    ELSE TO_CHAR(T.HOTLINE, 'YYYY')
    END
    ORDER BY CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'YYYYMM')
    ELSE TO_CHAR(T.HOTLINE,'YYYY') || '00'
    END
    There might be a better way to write this, but that isn't the issue at the moment.
    I have many different tables, each with different fields. I need to produce counts on each of those fields. Some of those fields have a limited number of values where I need to count the occurrences and attach a description (like the RTYPE counts above). Others, like Last Purchase Amount, require counts within ranges (between 0 and 9.99, 10 and 19.99, etc.). Still others are "multiple choice"-style fields (such as products purchased), where we have multiple single-char flags that are not null when the corresponding products are purchased. In this case, we need to produce statistics that look like this:
              2001     2002     2003     11/03     12/03 01/04     02/04 03/04     04/04     05/04 ...
    Product 1 .........
    Product 2 .........
    The worst of the bunch is a field where I need to count the occurrence of each value within it (hundreds of values) without entering descriptions, so I don't know how many rows will appear ahead of time. This is used for "source codes" that identify where the name/address came from. They look similar to the RTYPE above, but the leftmost column contains each value from the field rather than a description. There are so many possible values and they change so often that it isn't feasible to enter a description for each one.
    Right now, I manually create an Oracle Report for each table when I design/load it. This is becoming difficult to manage, since I have over 150 of them now. Each of these reports can have any number of matrices to display (the largest right now has about 25).
    The new table structure to generate these reports consists of two tables: A COUNTHDR table and a COUNTROW table. The COUNTHDR table represents a single Matrix within the report. It contains info such as a heading for the Matrix and whether column totals should be calculated or not. The COUNTROW table contains a description for each row and an SQL Fragment that contains an appropriate WHERE clause to match the description. In the event of a "source code" style count, COUNTHDR has the name of the field to count. COUNTROWs won't exist, so I'll be handling those counts differently. But, ignoring that issue for now, the report structure looks like this:
    + Q1 +
    |
    + COUNTHDR +
    |
    + COUNTROW +
    | linked query
    + Q2 +
    |
    + COUNTDTL +
    Q2 is the query with lexical parameters for the table and "where clause" that identifies the actual statistic I need counted. I need fields from COUNTROW and COUNTDTL to form a Matrix.
    Can this be done? How?
    Of course, if anyone out there has a better idea on how to achieve my goal of not writing a report per table, please let me know!! :-)
    TIA
    Eric Raskin
    PS. This structure does not exactly duplicate my original query, since multiple Matrix rows are created by the single SQL query given in the example. Instead, I'll end up executing an SQL query for each row, which is less than desirable. The design will need some tweaking...
    PPS. I have tried handling this problem by pre-counting the target table and storing the results in a COUNTCOL table, containing the details of the matrix. This actually does work, but the performance is terrible. I have one "source code"-style count that generated over 20,000 detail cells, including all the "0" cells needed to fill out the matrix. If you don't generate the "0" cells, you get holes in the matrix presentation and/or error messages (which I can explain if you wish). I never did get Oracle Reports to print this one -- I gave up after an hour of runtime on a P4 3GHz machine connected via Gigabit Ethernet to the server. Hence the attempt to push the SQL Queries back into the Oracle Report itself.
    Eric H. Raskin Voice: 914-765-0500
    Professional Advertising Systems Inc. Fax: 914-765-0503
    200 Business Park Dr Suite 107 [email protected]
    Armonk, NY 10504

    Hi there
    here's example of my code
    Html header of the page :
    <script language="JavaScript" type="text/javascript">
    function callMyPopup (formItem1,formItem2) {
    var formVal1 = document.getElementById(formItem1).value;
    var formVal2 = document.getElementById(formItem2).value;
    var url;
    url = 'f?p=&APP_ID.:8:&APP_SESSION.::::P8_PROJECT,P8_PDRL_NO:' + formVal1 + ',' + formVal2;
    w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    </script>
    troubleshooting
    1.Test each parameter separate first - each work ?
    2.Use code above, rerig it, create multiple parameter
    3.try again...
    hope this helps...
    check your orginial source (page where items are) - what data

  • Not all lexical parameters are being bound

    Reports SQL parser is binding to only 2 of 4 variables. SQL TRACE option confirms this:
    AND CABCHCK_CORT_CODE = :P_COURT_CODE
    AND CABCHCK_LOCN_CODE = :P_COURT_LOCATION_CODE
    AND CABCHCK.CABCHCK_DATE >= TO_DATE(:P_DATE_FROM)
    AND CABCHCK.CABCHCK_DATE <= TO_DATE(:P_DATE_TO)
    Bind Variable Value
    P_COURT_CODE 23
    P_COURT_LOCATION_CODE TC
    Note that :P_DATE_FROM and :P_DATE_TO are not shown in the trace as a 'Bind Variable'. The error message when running the report is:
    ORA-01008: not all variables bound
    This is a report which has previously worked and where the SQL code and the lexical parameters have not changed (but the layout changed slightly). Could this be yet another corrupted .rdf file? If so, how is this circumvented?
    Regards,
    Steve

    The issue has been found and solved.
    The SQL code is loaded into a lexiconal variable and run from the query. For example,
    :P_WHERE_COURT = 'and cabchck_cort_code = :p_court_code';
    This was in the BEFORE_REPORT trigger. It worked.
    However, the third and forth lines (with the TO_DATE function call) were not working. In the SQL statement, the functions referenced the :P_DATE fields but they weren't bound.
    The date statements were loaded in the same BEFORE_REPORT trigger as the court and location lines. By moving all of the code into the AFTER_PARAMETER trigger, the errors went away and the SQL processed normally.
    Why would this move from BEFORE_REPORT to AFTER_PARAMETER have done this?

  • Passing of BOOLEAN parameters to PL/SQL stored procedures

    Hi ,
    How i can pass BOOLEAN parameter to store Procedure or do i need to pass it as Integer?
    waiting for quick reply
    Thanks in advance ,
    Pramod

    Disclaimer: I work for the company that makes the product mentioned below.
    Procedures that take boolean parameters can be called using JDBC without having to modify them or write additional 'wrapper' procedures. The secret is to write an anonymous block that accepts a numeric parameter and sets a boolean PL/SQL variable with it before calling the procedure.
    [url http://www.orindasoft.com/]OrindaBuild is a utilty made by my employer that does this along with a bunch of other stuff. If you open
    [url http://www.orindasoft.com/public/Java2HTML/com/orindasoft/demo/generated/plsql/simpleExamplesDirectFlightAvailable.java.html]this URL and scroll to the bottom you'll see an example of this technique in use for a BOOLEAN OUT parameter. The relevent code is:
    public String getProcCallStatement()                                            
    236    {                                                             
    237    return("DECLARE \n"
    238          +"/* Generated By OrindaBuild 4.0.1919 */ \n"
    239          +"/* Which can be obtained at www.orindasoft.com */ \n"
    240          +"p_fromcity VARCHAR2(32767) := ?; \n"
    241          +"p_tocity VARCHAR2(32767) := ?; \n"
    242          +"p_direct BOOLEAN := null; \n"
    243          +"p_direct_SN SIGNTYPE := null; \n"
    244          +"BEGIN  \n"
    245          +"SIMPLE_EXAMPLES.DIRECT_FLIGHT_AVAILABLE(p_fromcity,p_tocity,p_direct); \n"
    246          +"  \n"
    247          +"IF p_direct IS NULL THEN  \n"
    248          +"  p_direct_SN := 0;  \n"
    249          +"ELSIF p_direct = FALSE THEN  \n"
    250          +"  p_direct_SN := -1;  \n"
    251          +"ELSIF p_direct = TRUE THEN  \n"
    252          +"  p_direct_SN := 1;  \n"
    253          +"END IF;  \n"
    254          +"? := p_direct_SN; \n"
    255          +"END; ");
    256    }     'p_direct' is a boolean variable we use to capture the result of the stored procedure.
    'p_direct_SN' is a variable of SIGNTYPE, a numeric datatype that can have the values -1, 0, or 1. This makes it ideal for representing booleans. The IF statement afte the procedure call sets p_direct_SN based on the value of p_direct. The magic code is in line 254:
    ? := p_direct_sn;
    If you bind '?' as a numeric out parameter you get -1, 0 or 1 back when you run call the stored procedure.
    This technique allows you to call PL/SQL procedures that have boolean parameters without having to write additional PL/SQL code. The only drawback is that you have to work with -1,0 and 1 on the Java side.
    David Rolfe
    Orinda Software
    Dublin, Ireland
    David Rolfe
    Dublin, Ireland

  • Multiple SQL queries in additional PL/SQL code in Report

    Hello gurus,
    I have a form in my portal populated some searching parameters and these parameters inserted into some temporary tables such as name_temp, addr_temp. And then I have a report that run based on these parameters, I have added additional PL/SQL code in the report at the time after the header was displayed. The code is as follows:
    declare
    checkname varchar2(40);
    checkaddr varchar2(100);
    begin
    select emp.name into checkname from emp
    where name = (select name from name_temp);
    select personnel.addr into checkaddr from personnel
    where addr = (select address from addr_temp);
    end;
    The problem I have is always the first SQL statement was executed, but not the second one, nor the third one. Does PL/SQL only supports one SQL statement per call? Please help. Is there a better way to handle this case?
    Thanks.
    Vince

    Hello gurus,
    I have a form in my portal populated some searching parameters and these parameters inserted into some temporary tables such as name_temp, addr_temp. And then I have a report that run based on these parameters, I have added additional PL/SQL code in the report at the time after the header was displayed. The code is as follows:
    declare
    checkname varchar2(40);
    checkaddr varchar2(100);
    begin
    select emp.name into checkname from emp
    where name = (select name from name_temp);
    select personnel.addr into checkaddr from personnel
    where addr = (select address from addr_temp);
    end;
    The problem I have is always the first SQL statement was executed, but not the second one, nor the third one. Does PL/SQL only supports one SQL statement per call? Please help. Is there a better way to handle this case?
    Thanks.
    Vince

  • APEX,PDF's, BI Publisher and SQL Query returning SQL code..

    I don't know if I should be posting this in this Forum or the BI Publisher forum, so I am posting in BOTH forums..
    I love APEX, let me say that first.. And appreciate the support offered here by the group, but am running int a confusing issue when BI Publisher tries to build a report from the above type APEX report..
    Here is my dilemma:
    I have a number of reports that are part of a Oracle package. They return an SQL Query back to a reports region on a page. I am having to deal with the column names returned are col01, col02..
    The issue I have is, when building the Application Level query to download the XML sample from in building RTF layouts in Word, you can not use this code, you MUST use a standard SQL Select.
    I have taken the sql from the function returning sql, and copied into the application query, supplying the required data values for bind variables being used in the query.
    An XML file is produced, and I use this to build the RTF format file that I load back into APEX and try to use it for the PDF rendering of the report. I can view the output as a PDF in the Word add on, but when I try using it with the report, it is returning an empty PDF file.
    Can anyone tell me what error log files on the bi publisher side I can look at to see what error is happening?
    Thank you,
    Tony Miller
    UTMB/EHN
    Title adjusted to allow people to know what I am talking about...
    Message was edited by:
    Tony Miller

    Tony,
    You can find the log as follows:
    - go to http://[yourserver]:[yourport]/em
    - logon to OC4J EM: oc4jadmin/[yourpassword]
    - click on "logs" at the bottom of the page
    - in the hgrid/tree, expand OC4J->home->Application
    xmlpserver
    - click on view log icon
    You can also observe what's going on in BI Publisher
    by going to the command prompt from where you started
    it.
    Or, as a third option, you can locate the file on
    your file system, depending on your setup, the path
    would be something similar to this:
    \oracle\product\10.2.0\bip\j2ee\home\application-deplo
    yments\xmlpserver\application.log
    With that said though, I don't expect you'll find
    much in there that would help with your particular
    problem. I suspect you either get no rows in your XML
    at runtime, due to some session state issues, or your
    XML structure does in fact not match your RTF
    template.
    I'm not quite following your problem description,
    i.e. when did you do what and are you associating
    your report layout with a report query or report
    region. So just some general notes, your query needs
    to be parseable at design-time, when exporting the
    XML, so that you get the XML file with the proper
    column names derived from your query. If you want to
    use your RTF template with a standard report region,
    you must export the XML file first using the advanced
    XML structure option. And of course the column names
    in your report query need to match the column names
    in your report region.
    Perhaps this helps you further diagnose what's going
    on, if you have additional information that could
    help, let me know. And if you could stage this on
    apex.oracle.com, I'd be happy to take a look.
    Regards,
    MarcMarc,
    Thanks for looking at this issue. Below find my remarks to your questions..
    Re: your query needs
    to be parseable at design-time, when exporting the
    XML, so that you get the XML file with the proper
    column names derived from your query.At the start of this process, the query code was a function in a package. The function was returning an SQL select statement, for a report region on a page. I took the select statement, built an application query to build a sample of the xml for BI Publisher desktop (Add-on for Word). The code was producing the usual Col01, Col02.. since at design time that is were the column names.
    When I then took the xml from this and built the rtf for loading into my APEX application.
    When testing the Application Query with this RTF report layout, I am getting PDF's. When using it with the report region sending an xml feed to BI Publisher I am getting nothing back.
    I have since taken the sql code and moved it back into the report region, and set the region to have a type of straight SQL Query. I have even tried to hard-code the parameters I was getting from the page to limit data returned.
    Is it possible to see the xml being produced by the APEX page?
    Re: Stage this on apex.oracle.com.. I would love to, but we would have HIPPA issues if I posted the data on a public website.
    Can I send you the RTF file and the xml file that the application query is creating to see if there something weird about them?
    Thank you,
    Tony Miller
    UTMB/EHN

  • Page Parameters in PL/SQL Pages

    The OAS User's Guide says:
    "You can define page parameters for PL/SQL Pages. Values for these parameters are passed to bind variables in the PL/SQL code. For example, if the PL/SQL page 'myplsqlpage' contains the PL/SQL statement 'a:=:param1'; and a page parameter is specified named 'param1' with the value '123' (param1=123), this URL is used to access the PL/SQL page in Oracle AS Portal:
    http://myportal/myplsqlpage?param1=123
    In the PL/SQL code, the bind variable 'a' is assigned the value '123'."
    But I did that but I have the following message:
    ORA-01008: not all the variables have been binded (WWS-22518).
    Please I have an example.
    Thanks in advance.

    Hi Patrick,
    Your suggestion seems interesting and simplistic and I wonder if you could make it working. Because, I worked on a similar suggestion some months ago and it did not work. unless I am confusing your idea with something else, it is not designed to work - although it was claimed in the documentation to work. On talking to Oracle we were able to pin down that it was a documentation bug and a new note was created to state that.
    You may wanna see the following Metalink Note which says that passing parameters from a PLSQL page is not allowed.
    regards,
    AMN
    Subject:      Unable To Pass Parameters To A PL/SQL Page
    Doc ID:      Note:550373.1
    Cause
    Page parameters were not designed to work with PL/SQL pages. However the Oracle® Application Server Portal User's Guide states that this is possible.
    This is a documentation bug and it is related to the following unpublished bugs:
    BUG 5007570: GET PARAMETERS IN PL/SQL PAGE
    BUG 3473023: PASSING PARAMETERS TO PL/SQL PAGE IS ERRORING OUT - ORA-1008
    Solution
    -- To implement the solution, please execute the following steps::
    PL/SQL pages do not support to pass parameters. If you need to pass page parameters to a database provider components such as forms and reports, then you need to create a simple page and follow notes below:
    Note 265180.1
    Title: How to pass parameters to a form, which is placed as a
    portlet inside a page?
    Note 287545.1
    Title: How Pass Parameter Via URL to a Report Using Page Parameters

  • Using PL/SQL code in ODI User Functions

    Is it possible to write PL/SQL code (with multiple in params and one out param) in ODI User Function ?
    Actually I need to use this user functions in my interface mapping.
    I know it can be done using ODI Procedures but Procedures cannot be used within interfaces when mapping columns.

    Hi Anurag Ambasta,
    You can use the ODI user functions and choose the Linked technology as 'Oracle' where you can implement and use oracle syntax .
    And the user functions can receive the multiple parameters and it returns the single value to the function cal, which use are expecting right?
    Thanks,
    Yellanki

  • How can i identify the environment name or database name in the PL/SQL code

    Hi,
    I am using UTL_FILE to genearate the files.,
    My problem is, I have to design the common sql file , which can be executed in 2 diffrent environments ( Say QA & DEV ) , with no parameters. It has to identify the environment and based on the environment , it has to generate the concern files.,
    The only change needs to be incorporated is , file names , which will change based on the environment.,
    can nay one tell me , how can i identify the environment name or database name in the PL/SQL code ??
    Raja

    In this case, USEC_GI_DEV.NA.XXXNET.NET is a TNS alias. That alias exists only on the client machine. There is no way to access that information on the database server.
    You would have to find something in the v$database or v$instance table that uniquely identifies the database (and you may need some help from the DBAs to do this because you need to ensure that the data element you choose is compatible with whatever refresh process(es) are used in your environment).
    Now, if you are writing a stand-alone SQL*Plus script, SQL*Plus, as a client tool, does have access to the TNS alias in later versions. But that is a client-side determination, not a server-side determination.
    Justin

  • Dbms_session.set_sql_trace(true) in PL/SQL Code to trace execution

    Hi,
    I'm working on some legacy PL/SQL Code with the objective of tuning. I added the following to the PL/SQL Body so that I can trace the execution and identify low-hanging-fruit that can be tuned.
    I added the following after the BEGIN section of the PL/SQL body:
    trace_process_flow_info_sp( this procedure captures the parameters passed into the procedure of the package body);
    execute immediate 'alter session set events '||''''||'10046 trace name context forever, level 12'||'''';
    dbms_session.set_sql_trace(true);
    My objective is to capture the execution of the code, capture the bind variable values, however I am not seeing the bind values in either tkprof or the Trace Analyzer.
    Any Ideas on how to see the Bind Variable Values?
    Thanks

    Level 0 means no binds.Are you sure that this level is available?
    According to note 115675.1 there are only four
    possible levels (1,4,8,12)Hmmm it seems you are right.
    SQL> conn xxx/xxx@xxx
    Connected.
    SQL> ed
    Wrote file afiedt.buf
      1* alter session set events '10046 trace name context forever, level 0'
    SQL> /
    ERROR:
    ORA-02194: event specification syntax error 231 (minor error 283) near '0'
    SQL> ed
    Wrote file afiedt.buf
      1* alter session set events '10046 trace name context forever, level 1'
    SQL> /
    Session altered.
    SQL> The same results for 9.2.0.7.0 and 10.2.0.1.0
    So OK a correction dbms_session.set_sql_trace(true) means level 1, but anyway it means no binds.
    Thank you for your correction, should go and update my article!
    Gints Plivna
    http://www.gplivna.eu

  • Object dependencies in PL/SQL code

    Hi everyone,
    Did anyone interest in the topic search for dependencies between objects in the database?
    I want to see the PL/SQL code which is an appeal to a particular procedure or function or package and where and how does a table use in any PL/SQL code.
    Often do you have a need to get answers to these questions?
    I'm developing such tool now and I want to know, if everybody interested to one.

    >
    It's very simple. I know about PUBLIC_DEPENDENCIES' but I want to know how does an object use, to continue a search in subobjects
    >
    Sorry but that isn't very simple or clear to me. Can you provide a simple example of what you are talking about?
    And are you familiar with PL/SCOPE?
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_plscope.htm
    >
    PL/Scope is a compiler-driven tool that collects data about identifiers in PL/SQL source code at program-unit compilation time and makes it available in static data dictionary views. The collected data includes information about identifier types, usages (declaration, definition, reference, call, assigment) and the location of each usage in the source code.
    >
    Search this forum for pl/scope and these links discuss using it.
    Re: Finding out all procedures , functions in a tree like structure in sequence
    Is PL/Scope all about all_identifiers?
    Re: find object dependences in the same object
    Re: PLSQL design: Common Shared Exception Handling Code

  • SCCM 2012 Reports: Viewing SQL Code

    Hi
    Is there a way to view the SQL code of the template reports .i.e. Software 06A - Search for installed software?
    Regards
    Ivan

    how to download the .rdl:
    Go to http://YOURConfigMgrServerNamethatHastheSRSRole/reports
    Browse to the folder containing the report.
    When you are looking at the report title, withOUT clicking on the report, when you hover over the report name, notice how there is a downward triangle on the right?  Move your mouse over that, and pull that down.  One of the choices listed is "Download..." 
    Click on that, and save the report's RDL to a location you'll remember.
    Go to that location after saving, and you can open up that .rdl file using Notepad.  A lot of the report will be for formatting, colors, etc; but if you search for the word "Select", you'll find at last one; possibly more if there are parameters
    in that report.  One of the locations for Select... something will be the main report code.
    Standardize. Simplify. Automate.

  • 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

  • How to do UT for pl/sql code?

    Are there some tools for doing Unit Test for PL/SQL code?
    Are there any others tools,except the function of test in pl/sql developer?

    I have defined a package named pkg_utplsql_test with 1 function called btwnstr (taken from utplsql samples).
    This package/function exists in schema1@instance1.
    Now I have schema2@instance2. Here I have defiend my test package called ut_pkg_utplsql_test and this has the setup and tear down
    procs as follows:
    procedure ut_setup
    is
        begin
            null;
        end;
    procedure ut_teardown
    is
        begin
             null;
        end;Now I need to add ut_btwnstr to test the proc defined in schema1@instance1. I have defined a dblink named instance1 to
    access the package from instance2. I am confused about writing ut_btwnstr . Here is what I have done and it does compile.
    PROCEDURE ut_btwnstr IS
       BEGIN
          utAssert.eq (
          'Typical valid usage',
          pkg_utplsql_test.btwnstr@instance1(STRING_IN => 'abcdefg',START_IN => 3,END_IN => 5),'cde');
          end ut_btwnstr; Is this correct?
    And now when I need to test it, how do I call. I am confised:(.
    exec utplsql.test('pkg_utplsql_test.btwnstr@instance1',recompile_in => FALSE)

Maybe you are looking for

  • Differences between Acrobat 8 and 9 for Comparing two document

    Hi, We have huge differences in Acrobat 8 and 9 while doing comparing the two document even both the text are identical. Acrobat 8 comparison document is very easy and effective when compare to Acrobat 9. I have attached the Acrobat 9 and 8 compariso

  • In need of Fixed-point algorithm

    hi peeps, Im in need ( a very urgent need ) of a fix-point algorithm , with explanations if possible. Can anybody point me to the right direction? thanks....

  • Clustering weblogic portal 10.3 with apache plugin

    Hi, we have configured a weblogic portal 10.3 cluster with two managed servers. We are using the apache 2.2 plugin module for dispatching. It seems for us that the plugin is not working correctly. It dispatches all request only to one server (we have

  • Lumia 635 on Skype?

    My current phone is the Lumia 610 which apart from Skype being pulled off of it for no good reason (when I had it, Skype worked well).   I am looking at a new phone which will likely either  a Lumia 635 or Moto G.   Given the complete disaster of  Sk

  • I am having problems updating Camera RAW

    I see that ERROR DW050 includes  Photoshop Camera Raw (64bit) failed...What can I do?