ODM PL/SQL Generator

I understand that I can generate PL/SQL to generate, test and apply activities. To avoid reading all the plsql code to understand how it can be used through and test my assumptions on the different options by generating plsql, is there documentation describing how to use this feature of ODM gui?

Hello
There is online help.
Go in the menu help/HelpContents and read the section "generator of Code PL/SQL Oracle Data Miner".
Thank you, mark

Tags: Business Intelligence

Similar Questions

  • PK PL/SQL generated for a table

    Hi all

    How we generate a pk for a new line of an element, which is defined with a value for the new pk?

    In an old thread Re: form of PL/SQL generated Primary Key? , someone added links to explain that, unfortunately, they do no more work.

    Can someone explain to me how this could be done?

    Thanks in advance


    Kind regards
    Cleo

    Published by: Cleopatra on March 7, 2011 05:42

    You may not use the "* Source Type * ' as primary key" * Custom PL/SQL function * "and use the function

    BEGIN
      return v('ITEM_NAME');
    END;
    
  • Get the value of the pl/sql-generated form?

    Hello

    I have an APEX page with a dynamic region of PL/SQL.  This region calls a PL/SQL procedure that generates html.  In this html code, open a form with a text box (id = "txtUserEnteredText") waiting for user input.  I need to know how to set the value of an element of APEX page on click of a button with text entered by the user. What I have tried is the next dynamic action for the button (without errors or data is returned):

    -Dynamic action

    Event: When a click on

    Article type: button

    Button: P20_GET_TEXT

    -Action

    Action: Set

    Set type: Expression JavaScript

    JavaScript expression: $x (document.getElementById('txtUserEnteredText').value);

    -The items affected

    Selection type: item (s)

    Product (s): P20_DISPLAY_TEXT

    What I expect is that the P20_DISPLAY_TEXT element will display the text entered by the user once the button is clicked.  Another way to say that it is perhaps that I need is to know how to retrieve a value from a rendered HTML element already generated by the PL/SQL Web ToolKit via a dynamic region of PL/SQL.  The HTML element in question is a text box that allows a user to enter text.  I need to retrieve the text entered in the user in order to process these data instead of using Web ToolKit procedures.

    I know it's a crazy way to do things, but I just need to know if I can do it and how.

    I use APEX 4.2.2 on the 11.2.0.3 database.

    Thank you

    -Seth.

    Here's what I did in the end to enter the data in the database...

    1. at the level of the page, I created the following function to set the value of the hidden page element:

    function setItemValue (pRequest) {}

    var itemVal = $("input[name=txtUserEnteredText]").val ();

    $("#P20_DISPLAY_TEXT").val (itemVal);

    doSubmit (pRequest);

    }

    2. then, I created a point of region button named SUBMIT (as a redirect to URL) that called the function:

    JavaScript:setItemValue('SUBMIT');

    3. Finally, I created a process page (as after the presents... and when you press the button) call to a procedure of package to do the actual update:

    pkg_name.proc_name(:P20_DISPLAY_TEXT);

    Thank you

    -Seth.

    SPECIAL NOTE: I could never make this work in IE - only in Chrome, Firefox and Safari - due to an error of "Validation of Page protection.

    Post edited by: backintheday "I added special note on browser differences.

  • PL/SQL-generate CSV file

    I was told that I was able to generate a CSV file via method UTL_FILE. Can anyone provide the skeleton of how should I create in PL/SQL?

    I tried the google search, but it says in words and not code itself.

    I have this PL/SQL which I want to generate a CSV file.
    SET SERVEROUTPUT ON;
    SET TIMING ON;
    
    DECLARE
        CURSOR C1
        IS 
        select balance from contract ;
        
    BEGIN
        FOR i IN C1 LOOP
    
     IF i.balance <> '0' THEN
          DBMS_OUTPUT.PUT_LINE('Amount is not 0 ');  
    I will like to put the statement 'Amount is not 0 ' in a CSV file here
    
         else 
         DBMS_OUTPUT.PUT_LINE('Amount is 0 ');  
         END IF;
        
         end loop;
    END;
    /
    How am I suppose to do?

    Published by: JoannaLee on August 26, 2008 19:14

    Your question is a bit confusing. In your subject line and once again in your question, you talk about generating a CSV file. This is a comma-separated values file (where the acryonym). But your question seems to ask about the generation of a file with a phrase in computing - that would be a flat file, but not a CSV file.

    The links provided show you exactly how to generate a CSV file, based on an arbitrary query.

    If you are not looking to generate a CSV file, and instead, you just want to generate a flat file to which you can write data, you can just use the UTL_FILE package. Assuming you're on a recent version of Oracle, you need to create a directory object, i.e.

    CREATE DIRECTORY directory_name AS 'path_to_directory_on_database_server'
    

    Then you would grant privileges on this directory for any user object will hold the procedure who wants to write to the directory

    GRANT read, write ON directory_name TO some_user
    

    In your code, you should just open the file and write

    DECLARE
      l_file utl_file.file_type;
    BEGIN
      l_file := utl_file.fopen( 'DIRECTORY_NAME', 'name_of_file', 'w' );
    
      <>
    
      utf_file.put_line( l_file, 'String you want to write to the file' );
    
      <>
    
      utl_file.fclose( l_file );
    END;
    

    Justin

  • How to integrate the dynamic SQL generated in the data definition XML file?

    Hi all

    I have it here is the XML file that is attached to the definition of data model RTF as below. Also, I have a function that will return to create a dynamic query as shown below.

    <?xml version="1.0" encoding="UTF-8"?> 
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0"> 
    <dataQuery> 
    <sqlStatement name="Q2"> 
    <![CDATA[
    

    Hi guys,.

    I was able to solve above the requirement. It was not possible to create only from SQL dynamically. Instead, I created a procedure that would create & update (attached to the data definition) XML file dynamically for each race.

    Kind regards

    Patricia K.

  • The question SQL generated by the motion of the Hyperion Intelligence report

    I have 2 tables and I'm pulling the column 'PRSN_NO' first table (A) and the "POOL_NM" of second column table (B).

    The join between A and B are

    A Left Outer Join B on A.PTY_ID = B.PTY_ID
    AND B.Start_dt < = A.End_dt
    AND B.Start_dt > = A.Start_dt

    The query exported the form

    SELECT DISTINCT AL1. PRSN_NO, AL2. POOL_NM
    OF VADIM_IR. AN AL1
    LEFT OUTER JOIN VADIM_IR. B AL2
    ON (AL1. PTY_ID = AL2. PTY_ID)
    WHERE
    (AL2. Start_dt < = AL1. End_dt
    AND AL2. Start_dt > = AL1. Start_dt)


    My expectation is

    SELECT DISTINCT AL1. PRSN_NO, AL2. POOL_NM
    OF VADIM_IR. AN AL1
    LEFT OUTER JOIN VADIM_IR. B AL2
    ON (AL1. PTY_ID = AL2. PTY_ID)
    AND (AL2. Start_dt < = AL1. End_dt
    AND AL2. Start_dt > = AL1. Start_dt)


    Please help me on this. I hope there is a setting in the creation of the eco file to get the outer join condition in the filter and I have not checked but still I am getting the join condition in the filter.

    Thank you
    KP

    have you try to define/set of this part of the sql ("(AL2.)") Start_dt<=>
    AND AL2. Start_dt > = AL1. Start_dt)"as a sql custom Start_dt fileld limiit?

  • PL/SQL - generate the error statement if the text file is not generated

    I have the following code as follows:
    SET SERVEROUTPUT ON SIZE 1000000;
    SET TIMING ON;
    --SPOOL draft.log
    DECLARE
    CURSOR C1 
    IS 
    SELECT * FROM Transaction;
    
    I_record_gen  INTEGER:=0;
    l_file                    utl_file.file_type;
    C_date                    CONSTANT VARCHAR2(8) := TO_CHAR(SYSDATE,'YYYYMMDD');
    
    BEGIN
    l_file := utl_file.fopen('Transaction_DIR','Transaction_'||C_date||'.txt', 'w' );
       FOR q IN C1 LOOP
       Utl_File.Put_Line(l_File,q.trans_id || '|' ||q.seq_no|| '|' ||q.count);
       I_record_gen:= 1;
       END LOOP;
     Utl_File.Fclose(l_File);
        EXCEPTION
        
       WHEN I_record_gen = 0 THEN
    dbms_output.put_line('Batch job runs successfully with no customer list extracted ');
        WHEN others THEN
               dbms_output.put_line('SQLERRCODE='||SQLCODE||'|'||SQLERRM);
    
    WHEN 
    
    END;
    /
    Based on the code, I want to generate a declaration in the error log if my variable I_record_gen has the value 0 when it has not entered my loop to generate the content of the file is generate.

    My code is correct? If not, how am I suppose to do?

    It looks like you want a custom exception. You can do the following:

    SET SERVEROUTPUT ON SIZE 1000000;
    SET TIMING ON;
    --SPOOL draft.log
    DECLARE
    CURSOR C1
    IS
    SELECT * FROM Transaction;
    
    I_record_gen  INTEGER:=0;
    l_file                    utl_file.file_type;
    C_date                    CONSTANT VARCHAR2(8) := TO_CHAR(SYSDATE,'YYYYMMDD');
    recordGenExc     EXCEPTION;
    
    BEGIN
    l_file := utl_file.fopen('Transaction_DIR','Transaction_'||C_date||'.txt', 'w' );
       FOR q IN C1 LOOP
       Utl_File.Put_Line(l_File,q.trans_id || '|' ||q.seq_no|| '|' ||q.count);
       I_record_gen:= 1;
       END LOOP;
     Utl_File.Fclose(l_File);
    
     IF I_record_gen = 0 THEN
          RAISE recordGenExc;
     END IF;
    
        EXCEPTION
    
       WHEN recordGenExc THEN
         dbms_output.put_line('Batch job runs successfully with no customer list extracted ');
        WHEN others THEN
               dbms_output.put_line('SQLERRCODE='||SQLCODE||'|'||SQLERRM);
    
    END;
    / 
    

    I added the following:

    -Adding a statement to an exception in the section DECLARE to your code.
    -Added a conditional to check the I_record_gen = 0 and then raised the exception if it was 0

  • How to find the redo generated by each SQL statement?

    Database version is 10.2.0.4. OS is AIX.
    We must again excessive generation during a specific time. We want to identify what a statement contributes to excessive recovery.
    ADDM shows this as a first observation

    Waiting on event "log file sync" during the execution of operations of COMMIT and ROLLBACK consumed at the time of the important data.

    Is it possible to know which statement sql generates how many redo in bytes for a moment?

    Thank you
    Delphine

    Is it possible to know which statement sql generates how many redo in bytes for a moment?

    It will not help you.
    For example, you can see a lot of UPDATE, DELETE, INSERT from the apps statements. Then? What you do with them? If you can modify the application to eliminate the useless LMD - it would be great of course. But it is unlikely.

    When the DML statements also generate Redo, does not cause them too much expectations "log file sync", because the writer log buffer empty buffer as soon as it fulfills more than 30% after a certain time or on Commit / Rollback.

    Waiting on event "log file sync" during the execution of operations of COMMIT and ROLLBACK consumed at the time of the important data.

    Right. This is because the writer written newspaper here synchronous, reliable, he waits until the HDD writes data down and meets its written OK.
    And hard drives are not the fastest things in the computer. They are mechanical - that's why.

    I would recommend:
    1. place files redo log on quick drives used preference dedicated only to this end. If other I/O will often disturb these readers resulting securities heads change causing longer HDD expected.
    2 consider using faster technology such as SAN or SSD.

  • How to set options to generate as Postgresql SQL Analytics

    Q: I need to know how to set options in web analytics or the driver BI so that web analytics will be limited to the Postgresql type commands.

    Environment: Web analytical running in Windows Exporer. Driver of BI of Oracle running on Windows XP. Tunneling via PuTTY on our own server non-Oracle database.

    I heard that somewhere in Oracle BI there is the possibility to activate and disable several features SQL so that Oracle users can capture their SQL generating tools (such as web analytics) to match other DB standards.

    Can someone tell me if this is true? If Yes, where can I access these options?

    Hello

    I'm sorry if I could not you, but I understand that you would like to BI Server to build queries depending on the your DB traits.

    If this is the case, you can then follow the steps below

    1. open .rpd

    2. navigate to the physical layer

    3. among the different databases, choose the one you want to resolve.

    4. right click, choose Properties-> features.

    5. here, you can see a number of features of DB that you could try to turn it OFF / ON.

    6. you can also perform a DBMS for "query" that will interview your DB.

    Hope this is what you are looking for.

    Thank you
    Diakité

  • If I can revise the SQL code generated by OBIEE

    Hi all

    I had a problemetic SQL generated automatically by OBIEE. I have to rewrite or at least add a tip to make it complete within a fixed period.

    But I'm not sure if OBIEE offers us this feature to change or customize the SQLs it generates?

    Please help to give some advice.

    Thank you very much.
    Leon

    Hi leon,.

    OBIEE increases the performance of the aliases table, cz as he can't do oneself joined himself.
    Please visit this link this will solve your problem to improve performance
    http://www.iwarelogic.com/blog/performance-increasing-OBIEE-724
    (GOLD) http://www.rittmanmead.com/2008/11/thoughts-on-OBIEE-performance-optimization-Diagnostics/

    UPDATE POST
    @leon, you cannot change the SQL code generated by obiee, your obligation to use EXISTS instead of IN operator, then you can do this in the physical layer of RPD by accessing the properties of the table and select SQL problem and write your query with condition EXISTS on the relevant tables. So that in turn Bi server accepts and converts according to its methodology.

    UPDATE POST-2
    @leon, you can use rownum in your where clause, but check the query generated by OBIEE and the results obtained by rownum satisfied your requirment.

    Please follow label by awarding points to make it useful to others and even for us. Rules to be followed http://forums.oracle.com/forums/ann.jspa?annID=939

    hope responds to your question.mark points.

    See you soon,.
    KK

    Published by: Jocelyn on January 24, 2011 22:25

    Published by: Jocelyne 24 January 2011 22:27

    Published by: Jocelyn on January 25, 2011 02:13

    Published by: Jocelyne 25 January 2011 05:26

  • Customize the operator for the SQL command

    With JDeveloper 12.1.3, I created a search form "Panel with ADF Query Table".  After having specified the search parameters, the SQL that is subject to the MSSQL root command generates the following error message:

    < oracle.adf.controller > < Utils > < buildFacesMessage > < ADF: addition of the following JSF error: incorrect syntax [FMWGEN] [SQLServer JDBC Driver] [SQL Server] close to ' |'. >

    java.sql.SQLException: incorrect syntax [FMWGEN] [SQLServer JDBC Driver] [SQL Server] close to ' |'.

    Here is the part of SQL code that is the question:

    WHERE (((city AS (?) || '%')) AND (State AS (?) || '%') ) ) ) )

    Since MSSQL does not accept the "|" as an operator is valid, an error message is generated.  MSSQL expects the CONCAT function or operator ' + '.  Is it possible and easy to configure JDeveloper for change the operator of ' | ' to the CONCAT function?

    OK, your settings are looking as it should.

    You have two options to work around the problem.

    (1) use your own sql generator, as shown here http://www.jobinesh.com/2013/02/customizing-sql-builder-class.html

    (2) modify the sql code generated for the START WITH operator generate the right sql for sql server code. For this, you can override the method getViewCriteriaItem() as shown here https://tompeez.wordpress.com/2011/08/21/extending-viewcriteria-to-use-sql-contains-4/

    Timo

  • SQL GROUP BY / HAVING a question

    Hello

    A few days earlier, I came across an interview question that I can not resolve correctly.

    In short, there are two tables: BOOKS and TAGS.

    ID TITLE AUTHOR
    1TwilightStephenie Meyer
    2Catch fireSuzanne Collins
    3Animal farmGeorge Orwell

    BOOK_ID TAG
    1Best Seller
    1Science Fiction
    1TOP10
    2Best Seller
    2Note.
    2TOP10
    3TOP110

    However several tags and the result must be a set of appropriate books, users can enter.

    For example, in the case of tags 'Best Seller', 'Science Fiction' and 'Top 10', the result must be "Twilight."

    My solution was something like this:

    SELECT b.title
    FROM books b
    WHERE
        b.id IN (
            SELECT book_id
            FROM tags
            WHERE
                LOWER(tag) = 'best seller'
        )
        AND b.id IN (
            SELECT book_id
            FROM tags
            WHERE
                LOWER(tag) = 'science fiction'
        )
        AND b.id IN (
            SELECT book_id
            FROM tags
            WHERE
                LOWER(tag) = 'top10'
        )
    
    
    
    
    
    
    

    But it is definetaly not an elegant and flexible query. In the case of labels of 10 or more incoming, we get a code 'spagetti '.

    Somehow, it should be possible to resolve using GROUP BY and HAVING, but I don't really know how.

    Could someone help what would be the most elegant solution to this problem?

    Thank you so much in advance.

    Maybe:

    SQL >-generating sample data:

    SQL > with books like)

    2. select id 1, the title of 'Twilight', author of "Stephenie Meyer" Union double all the

    3 select 2, "Taking fire", "Suzanne Collins' Union double all the

    4 Select 3, 'Animal Farm', 'George Orwell' of the double

    5)

    6, tags such as)

    7 select 1 book_id, tag "Best Seller" of all the double union

    8. Select 1, 'Science Fiction' from dual union all

    9. Select 1, 'TOP10' from dual union all

    10. Select 2, 'Best Seller' from dual union all

    11. Select 2, 'Roman' from dual union all

    12. Select 2, 'TOP10' from dual union all

    13. Select 3, 'TOP110' from dual

    14)

    15-

    16 - the actual query:

    17-

    18 select b.title

    Books b 19

    20, tags t

    21 where t.book_id = b.id

    22 and t.tag ('Best Seller', 'Science Fiction', 'Top 10')

    23 by b.title group

    24 after having count (*) = 3

    25.

    TITLE

    -------------

    Twilight

    1 selected line.

  • How can I define logic in obiee 11g sql

    Hi all

    I'm changing the SQL generated by OBIEE within the Advanced tab by default logical value. How can I edit that. It looks like read only. I can set the sql logic in Administration-> SQL problem. In 10g, I believe that we can paste SQL logic and set it. Any help will be appreciated. Thanks in advance.

    AJ

    Sorry I got it...... Create new analysis in the Advanced tab will do...

  • Union - generator of grid view layout query error could not create the checkerboard to correct view

    I get the error while I'm trying to run a simple union query below. The query uses simple areas. I use columns the same type of data in the same order in each of the areas and when I run the sql generated backend query, it returns the correct result. Only in obiee front end, it is not showing any result but giving the below error instead. I use version 11.1.1.6.8 Please help!

    The presentation view grid generator could not create the checkerboard to correct view. It lacked the logical column with the following ID: c6d9af7a1de3ca97a.

    Error details

    Error codes: WUSYDB5K

    Geographical area: saw.views.evc.activate, saw.httpserver.processrequest, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.

    handleConnection, saw.rpc.server.dispatch, saw.threadpool.socketrpcserver, saw.threads

    This is a bug, you must connect your environment to min 11.1.1.6.10 max 11.1.1.6.12/11.1.1.7.x

  • Advisor to the SQL query

    Hello

    I have the script as below:

    Table

    --------

    10001, A10001, E456, L2450, 100, 150

    10002, A10001, E456, L2450, 50, 150

    In the above example, we have 2 folders with the same combination with the exception of the 1st column which is seq. No. The last 150 column is the sum of 100 and 50. Here we pick up values from another table based on values Axx, Exxx and Lxx. The req. now, is that we must get total in the last column. As we can see, data are getting duplicated as the combination is even except seq. No.

    I'm looking for a way in which I can reduce to zero the value of the second occurrence of the same POV to avoid duplicates.

    Expected result:

    10001, A10001, E456, L2450, 100, 150

    10002, A10001, E456, L2450, 50, 0

    Any suggestions on this wpuld be really useful.

    Thanks in advance

    You can use ROW_NUMBER()

    SQL> -- generating sample data:
    SQL> with t as (
      2  select 10001 seqno, 'A10001' c1,'E456'c2,'L2450' c3,100 c4,150 c5 from dual union
      3  select 10002, 'A10001','E456','L2450',50,150 from dual
      4  )
      5  --
      6  -- actual query:
      7  --
      8  select seqno
      9  ,      c1
    10  ,      c2
    11  ,      c3
    12  ,      c4
    13  ,      case
    14           when rn= 1
    15           then c5
    16           else 0
    17         end c5
    18  from (select seqno
    19        ,      c1
    20        ,      c2
    21        ,      c3
    22        ,      c4
    23        ,      c5
    24        ,      row_number() over (partition by c1, c2, c3 order by seqno) rn
    25        from  t
    26        );
    
         SEQNO C1     C2   C3            C4         C5
    ---------- ------ ---- ----- ---------- ----------
         10001 A10001 E456 L2450        100        150
         10002 A10001 E456 L2450         50          0
    
    SQL>
    

Maybe you are looking for