Dashboard OBIEE - JavaScript - get the SQL logic

Hi Experts,

I have the dashboard with an OBIEE report and dashboard invites. So, whenever I change the values in the prompt lines in the report to amend accordingly. I hope that the sql logic changes also to the selection, I do on the dashboard page.

I want to take this logical sql update. I knew that we can write the javaScript function in the municipality. JS file and then call this function in the dashboard. But I want to know how I can get the update sql logic.

Any help or inputs would be appreciated.


Thanks and greetings
S

Hi Siva,

Sorry about that last post. I did not properly escape all my special characters and the Forum diverted.

I have corrected the errors and again tested the code. Works fine on IE and Moilla.

Give it another shot.

-Joe

Tags: Business Intelligence

Similar Questions

  • Get the SQL statement error programmatically

    Hello

    error SQL in the FORMS, you can display the erroneous SQL statement pressing (shift) (Ctrl) E on the screen. Is there a way to get the text of the SQL statement in a PL/SQL function for logging purposes?

    I get the error using SQLERRM, it's not a problem. But how can I get the SQL text of the statement?

    Thanks and regards,

    Sascha

    Sascha,

    You should be able to use the: SYSTEM. System LAST_QUERY variable forms.

    Craig...

  • Y at - it an easy way to get the sql code that is sent in the query UPDATE

    I have a request to UPDATE abbreviated for readability. Is there an easy way to get the sql code that is sent? I use get this info for sql select in the display of debugging in cfeclipse but not for the UPDATE.

    < cfquery debug = "" name = "q" datasource = "#datasource #" > "



    UPDATE [BookingSystem]. [dbo]. [tbTrades]
    SET
    [Status] = #MATCHED_STATUS #.
    WHERE

    clientID = < cfqueryparam value = "" #arguments.clientID # "cfsqltype ="cf_sql_integer"> AND"

    < / cfquery >

    It might pay to read the docs for - http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_p-q_17.html#1102316 - focusing on the RESULT parameter.

    Read also about debugging in CF: http://livedocs.adobe.com/coldfusion/8/htmldocs/Debug_01.html

    --

    Adam

  • How to get the sql query result?

    Hello

    Currently I use LV2012 to connect to an Oracle database server. After the Oracle Express and Oracle ODBC driver facilities/settings made.

    I managed to use the SQL command to query the data through my command prompt window.

    Now the problem is, how to do the same task in Labview using database connectivity tools?

    I have build a VI to query as being attached, but I have no idea of what range to use to get the result of the query.

    Please help me ~ ~

    Here is a piece of code that I use to test the SQL commands, you can use the part that retrieves the results of sql.

    It is also possible to get the rear column headers, but it's for the next lesson!

    ;-)

  • How to get the SQL query running of af: search?

    I use JDeveloper 11.1.2.3.0. I have a page where I've set up an af:query and an array of result. The problem is that I can't get the exact query that is used during the execution of this component in a managed bean method. Is it possible to get the query string that is run within the af: query?

    Thank you

    Hello

    Method of the ViewObject getQuery() returns what you need;

    You can replace the executeQueryForCollection(), and prior to calling super, you can print the result of getQuery() method:

    public void executeQueryForCollection (rowset Object,

    Object [] params,

    {int noUserParams)

    System.out.println ("SQL =" + getQuery());

    call the super method here...

    }

  • Get the SQL execution plan that is currently running in 9i

    Hello

    Apologies for the magnitude of this issue, but I was wondering if someone could help me to the more accurate/efficient way to get a piece of running Oracle 9i SQL execution plan.

    in 10g and 11g of course dbms_xplan.display_cursor (sql_id) can be used.

    How can this be achieved in 9i, currently I am just get the SQL_TEXT and then executing a plan to explain ("EXPLAIN PLAN for.") - I think that this is not neccesserally the same plan to explain that will be used for the sql code that runs if

    Any help would be appreciated.

    Thank you

    The plan exists after analysis difficult.
    Statistics of actual execution will require a completed.
    That is why sql followed in real time is so great in 11g.
    In 9i, difficult.

  • How can I get the SQL of a tablespace of the database

    Hi all

    I'm using Oracle 11 g R2. I want to get some tablespaces on my database SQL code. in the same way, I get the DDL of the table using the GET_DDL function.

    How can I get that?

    Kind regards

    Just use 'TABLESPACE' instead of 'TABLE' and a name of a tablespace instead of the name of a table and use dba_tablespaces or the user_tablespaces for a list of tablespaces.
    It's a simple as that!

    ------------
    Sybrand Bakker
    Senior Oracle DBA

  • How to get the SQL if I get exception

    I get this exception and do not know what was the actual sql with the variables of liaison who was executed.



    sqlmesg = error in the select query to retrieve the segment associated with a pair of cables: ORA-01006: there is no bind variable

    y at - it a way to get the real sql executed so I know what mistake I did.

    I thought your question was about how to view the SQL statement and bind variables in the exception. The answer to that is to put variables in the exception message.

    The root cause of the problem seems to be that your dynamic SQL statement may require 3 or4 variable bind but your USING clause specifies always 4 values if the underlying SQL statement has 3 positions, it will lead to an error.

    Justin

  • How to get the new logic board with 16 GB of RAM for my Macbook Pro retina 15 mid 2012?

    1 month ago I brought my Macbook to the Apple Store Genius Bar to check the GPU because I was worried about small lines on a screen while playing games.

    After 3 days of test engineering guys gave her back to me and told me that there is nothing they can do in this regard, because was unable to reproduce the problem, but gave me an option - completely replace the logic board for 700CAD. At first, I said NO, but also asked them, if they can replace the logic board, but with 16 GB instead of 8 GB, I immediately. I'll have to pay the money anyway, right? Why not?

    Long story short - they told me that they cannot do and can replace the logic board with the same RAM mount my Macbook at the present time. Specialists support Apple tells me the same thing via Chat application on the Apple Web site. Funniest - none of them could give a reasonable answer why they cannot do so.

    It's the same logic board, with the same size, but with more RAM.

    I understand that they need to sell more laptops and, if I need more RAM, I can go and buy the new Macbook, but to be honest, as an International Student I simply don't have so much money.

    So why can't they do it?

    Honnoshin wrote:

    If I need more RAM, I can go and buy the new Macbook, but to be honest, as an International Student I simply don't have so much money.

    So why can't they do it?

    You deal with politics Apple and no one on these forums can do something for you, since we are like you, only users of Apple products.

    Consider selling your MBP and put money to one with 16 GB of RAM.

    Ciao.

  • Is there a tool to view / get the SQL XML format?

    Hello
    Work on Oracle 11g R2 SOE.
    It is my first try with XML function, suppose I have a query similar to the one mentioned here, how to get a well formatted by this query XML file?
    I run on SQL Plus and tried 'Spool' in the xml file, but information was not in XML format.
    select xmlelement(
             "DEPARTMENTS",
             xmlagg(
               xmlelement(
                 "DEPARTMENT",
                 xmlforest(
                   d.deptno,
                   d.dname,
                   (
                     select xmlagg(
                              xmlelement(
                                "EMPLOYEE",
                                 xmlforest(
                                   e.empno,
                                   xmlcdata(e.ename) ename,
                                   e.hiredate
                                 )
                               )
                            )
                     from   emp e
                     where  e.deptno = d.deptno and
                            e.empno in (7369, 7499, 7934)
                   ) employees
                 )
               )
             )
           ) x
    from   dept d;
    Kind regards
    Fateh

    Fateh says:
    Thank you
    Yes, I meant by good - as XML, the same format you obtained as a result of your query.

    The point is that the expression "well formatted" in terms XML, means an XML document that has the opening and closing etc and responds to the XML standard. It does not mean one that is displayed in a way enough with all the beautiful indented of the hierarchy. This is called a "pretty print" XML document

    As Odie, for technical purposes you need only a well formatted XML document, because if you insist on using a pretty print XML, then you introduce a lot of white space in the document, which will make the XML content conisiderably of large files for example more big or bigger storage required. To treat XML programmatically there not enough print XML at all.

    So, why do you need your print by little data?

    If you have data stored in an XML file, you can simply open it in a web browser and it will present this pretty print for you... If it's just a case of you want to be able to browse the data for testing etc.

  • How to get the sql query

    Hello

    I already set date value as below.
    SET THE VALUE OF START_TIME = 2011-08-12 09:00
    DEFINE END_TIME = 2011-08-12 10:00
    and executes the table based on the defined date as below,
    Select * from my_table
    where
    (to_date (Accounting_Start_Time,'yyyy-mm-dd HH24:MI:SS) > = to_date ('& start_time ',' yyyy-mm-dd HH24:MI:SS) and to_date (Accounting_Stop_Time,'yyyy-mm-dd HH24:MI:SS) < = to_date ('& end_time ',' yyyy-mm-dd HH24:MI:SS))
    GOLD to_date (Accounting_Start_Time,'yyyy-mm-dd HH24:MI:SS) > = to_date ('& start_time ',' yyyy-mm-dd HH24:MI:SS) and to_date (Accounting_Stop_Time,'yyyy-mm-dd HH24:MI:SS) > = to_date ('& end_time ',' yyyy-mm-dd HH24:MI:SS) and to_date (Accounting_Start_Time,'yyyy-mm-dd HH24:MI:SS) < = to_date ('& end_time ',' yyyy-mm-dd HH24:MI:SS)
    GOLD to_date (Accounting_Start_Time,'yyyy-mm-dd HH24:MI:SS) < = to_date ('& start_time ',' yyyy-mm-dd HH24:MI:SS) and to_date (Accounting_Stop_Time,'yyyy-mm-dd HH24:MI:SS) < = to_date ('& end_time ',' yyyy-mm-dd HH24:MI:SS) and to_date (Accounting_Stop_Time,'yyyy-mm-dd HH24:MI:SS) > = to_date ('& start_time ',' yyyy-mm-dd HH24:MI:SS)
    GOLD to_date (Accounting_Start_Time,'yyyy-mm-dd HH24:MI:SS) < = to_date ('& start_time ',' yyyy-mm-dd HH24:MI:SS) and to_date (Accounting_Stop_Time,'yyyy-mm-dd HH24:MI:SS) > = to_date ('& end_time ',' yyyy-mm-dd HH24:MI:SS));
    ) but now I want to query the table based on the time,

    Any help please,.

    Hello

    It is not very hard in SQL * more.

    First of all, put your query in a script file, like this one, called hour_query.sql:

    --     hour_query.sql          Show data from my_table for a given time period
    
    PROMPT     The data below shows the period from &1 to &2
    PROMPT
    
    SELECT     *
    FROM     my_table
    WHERE     accounting_start_time     <= '&2'
    AND     '&1'               <= accounting_stop_time
    ;
    

    Parameters & 1 and & 2 are beginning and end of time, for example "2011-08-12 09:00".
    Note that this does not use TO_DATE. If you have incorrect strings in columns that must be DATEs, no errors occur.

    Assuming that hour_query.sql is located on p:\some_dir\, you want another script that runs hour_query.sql 24 times, like this one, which I will call all_hours.sql:

    @p:\some_dir\hour_query  "2011-08-12 09:00:00"  "2011-08-12 10:00:00"
    @p:\some_dir\hour_query  "2011-08-12 10:00:00"  "2011-08-12 11:00:00"
    @p:\some_dir\hour_query  "2011-08-12 11:00:00"  "2011-08-12 12:00:00"
    ...
    

    (I just did 3 hours to test. You can easily make that 24 hours).

    The following code creates and then runs all_hours.sql:

    -- Turn off SQL*Plus features that interfere with raw output
    SET     FEEDBACK     OFF
    SET     PAGESIZE     0
    SET     VERIFY          OFF
    
    -- Write all_hours.sql
    SPOOL     p:\&some_dir\all_hours.sql
    
    WITH     got_start_time     AS
    (
         SELECT TO_DATE ( '2011-08-12 09:00:00'
                            , 'YYYY-MM-DD HH24:MI:SS'
                     ) AS start_time
         FROM    dual
    )
    SELECT     '@p:\some_dir\hour_query  "'
        ||  TO_CHAR ( start_time + ((LEVEL - 1) / 24)
              , 'YYYY-MM-DD HH24:MI:SS'
              )
        ||  '"  "'
        ||  TO_CHAR ( start_time + ( LEVEL      / 24)
              , 'YYYY-MM-DD HH24:MI:SS'
              )
        ||  '"'
    FROM    got_start_time
    CONNECT BY     LEVEL <= 3     -- You can make this 24, or any other number
    ;
    
    SPOOL     OFF
    
    -- Turn on SQL*Plus features turned off earlier
    SET     FEEDBACK     ON
    SET     PAGESIZE     50
    -- Except VERIFY.  leave that OFF while all_hours runs
    --SET     VERIFY          OFF
    
    -- Run all_hours.sql
    @p:\some_dir\all_hours.sql
    
    SET     VERIFY     ON
    
  • JavaScript get the current path without %20 and / backslash

    Hello

    If I try to get my way .indd, is to give the path with %20 and / backslash and ":" lack also.

    How can I get my way with the exact format because I need to pass the path as an argument to a file beats.

    Please let me know if any idea you have.

    Use the following code:

    Folder.Decode (folderPath); where folderPath is the location of the file.

  • How to get the create view sql statement

    I have a technical problem

    There is a view in the database, for example "topstudentsview" and sql statement is ' select * student where scores > 90;

    My question is how to get the sql statement of the view. I want to get the sql statement in the topstudentsview

    Is the equivalent in MS Sql

    sp_helptext 'topstudentsview '.

    How in Oracle?

    Thank you

    user10182401 wrote:
    My question is how to get the sql statement of the view.

    Simple answer: use a tool. Almost every development tool will give you an option for this requirement.

    In Oracle SQL Developer (free), it's as simple as:

    Connect to the database with the user and click on "views".
    Select the appropriate view, and then click the SQL tab.

  • Get comma SQL query result

    Hey everybody

    I have a requirement where I need to get result separated by commas to names because there are many relationships that is, for each protocol, there are mutiple people linked to it, and I created the PL/SQL function for this and everything was going well and when he is in the production of several cursors have been opened due to the logic and leading to CARS more and for that we have summer manually clear cursors every weekend and I'm you're looking to create a view, materialized for this logic but I was unable to encode the logic by using Connect by clause

    The result is like and I want the names separated by commas for each protocol
    P06065 TESTER13 TESTER13
    P02095 PATRICIA CARMELITANO
    P02095 ANNE MUIR
    P02095 ROBERT HARLOW
    P02095 JANICE ALBERT
    P02095 Jacqueline van Dalen
    P02095 DR. GUENTER HENNIG.
    P05209 Olga Xenaki
    P05553 Birgit Limbach-Angele
    P05553 Anja Dr. Schulz.
    P05553 CHRISTA HAGENBUCHER

    Here's the function I wrote, I need to get the same logic through the SQL statement... Thanks for your help

    cursor c_GSCR is
    Select T565804. FST_NAME | » '|| T565804. LAST_NAME
    Of
    S_PT_POS_HST_LS T544105 / * S_PT_POS_HST_LS_Protocol_Team * /,.
    S_CONTACT T565804 / * S_CONTACT_Protocol_Team * /,.
    S_CL_PTCL_LS T541903 / * S_CL_PTCL_LS_Protocol * /.
    where (T541903. ROW_ID = T544105. CL_PTCL_ID and
    T544105. POSTN_ID = T565804. PR_HELD_POSTN_ID and
    T544105. ROLE_CD = 'Lead project manager' AND
    T541903. ROW_ID = v_PTCL_ID and
    T541903. PAR_PTCL_ID is set to null, and T544105. END_DT is null);

    BEGIN
    l_row_num: = 0;
    l_role: = ";
    l_role_list: = ";
    v_PTCL_ID: = PTCL_ID;

    C_GSCR OPEN;
    If C_GSCR % isopen THEN
    LOOP
    FETCH C_GSCR INTO l_role;
    When the output C_GSCR % notfound;

    IF l_role_list IS NULL THEN
    l_role_list: = l_role;
    ON THE OTHER
    l_role_list: = l_role_list | ',' | l_role;
    END IF;

    END LOOP;
    CLOSE C_GSCR;
    end if;

    ~ Srix

    Hello

    You can try something like this:

    select loan_code, rtrim(xmlagg(xmlelement(e,loan_tran_code||',').extract('//text()')),',')  as loan_tran_codes
    from  st_lo_trans
    where st_code  = 24
    group by loan_code
    
  • get the checkbox display names

    I want a dynamic action to set a field with NAME_A, NAME_B, NAME_C of a checkbox field that has values of 1,2,3

    I tried
    SELECT NAME FROM table value WHERE in: P1_COLOR

    the first work of box... but the second box I click error ora-1722 invalid number for the target value

    You could do just with JavaScript/jQuery (and get rid of this request altogether).

    Create a DA on change for your box using a jQuery selector. Assuming that this is the only check box, you can use: input: checkbox

    Then in JavaScript, get the value of the checkbox that has been verified:

    var checkedValue = $(this.triggeringElement).val();
    

    Then use this value to set your other value (assuming the other element has an ID of MY_THINGY):

    $('#MY_THINGY').val( checkedValue );
    

    -Joe

Maybe you are looking for