Add the variable of presentation in a prompt SQL results

Hello friends!

I have a prompt with the time Dimension (year (p.v. v_year) and month (p.v. v_month)). Then I have another guest of departments in the same page and I want to compel departments depends on my year and selected months before.

I know to do with variable presentation, if I go to SQL results in prompt Department and ADD the following: "WHERE"Sun Time"." Year=@{v_year}"it works but I want to add months also!

How can I do?


Thank you very much!!!

Hello

Use single quotes...
"like... month = ' @{var_month}"

hope this can work...

Tags: Business Intelligence

Similar Questions

  • Date format changes in the variable of presentation

    Hello
    I have a problem with the date stored in the variable of presentation.

    I have simple guest with the calendar control (default value date is set to session or deposit to the current date variable). Selected date is stored in the variable of presentation PP_DATE.
    I have a simple report with the title to view the contents of the variable PP_DATE.

    And now the problem.

    When I navigate to the page of dashboard with this report, I will get date of variable PP_DATE in a format (there are difference when I use the variable session or repository). After that I have will push the Start button, I get a different date format of variable PP_DATE.

    Screenshots are stored and described in this PDF file: [PDF with screenshots: https://docs.google.com/uc?export=download & id = 0B2LOPOBteIShMDRmYTJlYTItNmYyZC00ODdkLWE5NjktNzI1N2RlNWMwZjBk]

    There is difference between session variable and repository. When I use the reference variable I'll get "TIMESTAMP."... "the variable PP_DATE, which is the default initialization in variable Repository Manager. I tried to remove the boot by default, but I automatically added after saving changes.
    What is the default value of crimped guest of session variable, I get another date variable PP_DATE format that refers to DATE_TIME_DISPLAY_FORMAT = "yyyy-mm-dd hh:mi:ss.mss" (from NQSConfig.ini). I changed standard value DATE_TIME_DISPLAY_FORMAT ' yyyy/mm/dd hh' to "yyyy-mm-dd hh:mi:ss.mss" because I am reading data from excel, where dates are stored in the format MSSQL. But this isn't the reason for my problem. I have the same problem also with standard DATE_TIME_DISPLAY_FORMAT.

    The result of this strange behavior is that I get errors when I do some calculations (e.g. TimeStampDiff) to the variable PP_DATE. I get the error when I am accessing the dashboard page. Everything is ok after that I will push the Start button.

    You have some tips?

    Thank you

    Kishore Guggilla wrote:

    But I need sometimes current day default value in the command prompt, sometimes first day of the month etc...

    How do you manage that using variables to repository then?

    I have a block of initialization to initialize a few variables to repository.
    Initialization block a 1 day refresh interval.

    Select trunc (sysdate, 'mm'),
    LAST_DAY (trunc (sysdate, 'MM')),
    trunc (sysdate, 'DD'),
    trunc (sysdate, 'YYYY'),
    TO_DATE (' 31,12' | to_char (sysdate, 'YYYY')),
    TO_NUMBER (to_char (sysdate, 'YYYY')),
    TO_NUMBER (to_char (sysdate, 'MM')),
    TO_NUMBER (to_char (sysdate, 'DD')),
    trunc (ADD_MONTHS (sysdate-1), 'MM'),
    trunc (LAST_DAY (ADD_MONTHS (sysdate-1))),
    trunc (ADD_MONTHS (sysdate-2), 'MM'),
    trunc (LAST_DAY (ADD_MONTHS (sysdate-2))),
    trunc (ADD_MONTHS (sysdate,-3), 'MM'),
    trunc (LAST_DAY (ADD_MONTHS (sysdate,-3)))
    of the double

  • You should have seen the date using the variable of presentation

    Hi all

    I am facing a problem in the display of the selected date of the guest in the report using the variable of presentation. I have a guest of data (calendar prompt), where the user selects the value. I take this value in the variable RBAP of presentation and report when I try to display this value using the same presentation variable, I get my date in the following format

    "TIMESTAMP 2010-10-22 00:00:00 '.

    I'm just using ' @{RBAP}' in the formula in the column.

    I want to show my date in the format DD/MM/YYYY. How to do this?

    I have used CAST (' @{RBAP} {' as DATE} and tried to change the data to dd/mm/yyyy format, but it does not work.)

    Please suggest

    Thank you
    Ronny

    in the default section to write the SQL...

    Select the OPTION case SENSITIVE WHEN 1 = 0 THEN AnyExistedDateColumn CURRENT_DATE of OTHER END OF SubjectArea

  • documents on the variable of presentation need...

    Hello world

    I'm hurt on the concepts of variable presentation, so I really need some basic documents or links to the site on variables of presentation to learn with examples will be truly grateful.

    Concerning
    s

    Hello

    You should not initialize by using an inot block, when you apply a prompt value by clicking the Go/apply button, variable presentation will get initialized using the prompt value.

    Kind regards
    DpKa

  • the variable name of database query to SQL Server using the Oracle database link

    Hi all

    I have an ApEx 4.1 application running on x 64 (11.2.0.1) 11g on Windows Server 2008 x 64, and I have a few points of data integration with SQL (2005 and 2008) server that I need to create. I have configured the database with dg4odbc link and it works perfectly... I can run queries on the SQL Server database without any problem using the database link.

    However, there is a scenario where the SQL Server database name is dynamic, and I need to generate on the fly in a PL/SQL block and then use it in a query dynamic SQL (all this in the ApEx). It of wherever I meet problems... when I asked the default database that is based on the ODBC connection and I don't have to specify the name of the database, no problem. But when I need access to one of the several other databases by default, I received the error "invalid table.

    It works well:* (note that 'fv' is the name of my database link)

    v_query1: = "select 'Release Date' from dbo." Schedules@FV where dbo. Annexes. "" SchedID "=: calendar";
    EXECUTE IMMEDIATE v_query1 in rel_date using the grid.




    I then take this rel_date variable, convert a varchar2 (rel_date_char), then use it as the name of the database in the following query...


    _ It returns an error(error ORA-00903: invalid table name)

    v_query2: = "select"PARTNO": rel_date_char.dbo.ProdDetails@fv where 'SchedID' =: calendar and"UnitID"=: unit"
    and 'MasterKey' =: master and "ParentKey" =: parent';

    EXECUTE IMMEDIATE v_query2 in part_number using planning, master, parent unit;



    I also tried using all of the following conditions without result:

    "select"PARTNO"of" | : rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"of" | rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"of" | @rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"in @rel_date_char.dbo.ProdDetails @fv where 'SchedID'..."


    Is it possible to do it in PL/SQL?

    Thanks for any help!
    -Ian C.

    Published by: 946532 on July 15, 2012 19:45

    Just did a test using passthrough:

    SQL > set serveroutput on
    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5. start
    c: 6 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, "select count (*) from EMP");
    8 LOOP
    9 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    10 output when nr = 0;
    11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    12 dbms_output.put_line (val);
    13 end of loop;
    14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    15 end;
    16.
    24576

    PL/SQL procedure successfully completed.

    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5. start
    c: 6 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, ' select count (*) from dbo.) EMP');
    8 LOOP
    9 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    10 output when nr = 0;
    11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    12 dbms_output.put_line (val);
    13 end of loop;
    14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    15 end;
    16.
    24576

    PL/SQL procedure successfully completed.

    So all 3 ways work for me.

    Published by: kgronau on July 23, 2012 10:08

    Now, using the variables to make the selection:

    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5 tabname varchar2 (20): = 'EMP ';
    6 ownr varchar2 (20): = "dbo."
    7 dbname varchar2 (20): = "door";
    Start 8
    c: 9 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    10 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, ' SELECT count (*) FROM ': dbname: '.) ' || ownr | '.'|| tabname | ") ;
    11 LOOP
    12 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    13 when the exit nr = 0;
    14 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    15 dbms_output.put_line (val);
    16 end loop;
    17 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    18 end;
    19.
    24576

    PL/SQL procedure successfully completed.

    => instead of executing the statement using the "execute Immediate" we use the PASTHROUGH package to pass the statement to SQL Server.

    Published by: kgronau on July 23, 2012 10:10

  • Capture selected vales of Date dates invite you using the variable of presentation

    We have an obligation to display the date on the text of the report / whatever the user selects the date from the command prompt.
    We have a date called created and used operator is between.
    Can someone help me in this area, the use of variable presentation to capture the values of a single Date column of creation?

    In the criteria to add more than 2 columns for Date of creation
    and use these expressions foreach and hide them
    MAX (RMAX (creation Date))
    MIN (RMIN (creation Date))

    In your story view we will call @1 and @2. assuming that these 2 columns are first from left to right.

    No need to use variables of the presentation.

    Mark as correct

    Thank you

    Published by: Srini VIEREN on April 22, 2013 16:47

  • Report not loading - using the variable of presentation

    Hi all

    I use a variable presentation in the guest of my dashboard and going to the filter in the report. The report will give me no result even when it meets the criteria. I have to purge the cache and then it will display the results. I do 20 - 30 times a day and I don't know what the problem is. Can someone guide me what needs to be done to solve this problem.

    Thank you.

    Hello
    Yes like angelique suggests trying to create the same report in another page with variable presentation online. I do not have that we might have this problem with cahce. Even try to make protected filter (click the filter option, you can see it).

    Kind regards
    Srikanth

  • Filter using the variable of presentation: null problem

    I have a report with filter based on a variable presentation.

    "CLIENT_NAME = ' @{VAR_CUSTOMER}"

    How can I make the filter select all lines when my presentation variable is not initialized or initialized with a constant such as ' * all CUSTOMERS *'?

    Thanks in advance,
    Alex

    Hello

    Try

    CLIENT_NAME = ' @{VAR_CUSTOMER}' OR @{VAR_CUSTOMER} {'* GUESTS *'} = ' * ALL CUSTOMERS

    Concerning
    John
    http://obiee101.blogspot.com/

  • Add the variable to a variable... ?

    I want to load a piece of text in a textfield according to its variable with the id of the button variable. Can it be done? And how do I fix it? With this example in flash can not recognize the part of the text he nead.

    ID = 2
    _root.textload = "textfile.txt".

    this.onRelease = function() {}
    Titel = ("title" + (id));
    subtitel = ("subtitel + (id));
    mainText = ("maintext" + (id));
    _root.mc_index.thisText = new LoadVars();
    _root.mc_index.thisText.editable = false;
    _root.mc_index.thisText.load (_root.textload);
    _root.mc_index.thisText.onload = {function (success)}
    If (success) {}
    _root.mc_index. Titel.Text = this.titel;
    _root.mc_index.subtitel.text = this.subtitel;
    _root.mc_index.mainText.text = this.maintext;
    }
    };

    Try:

  • Add the function to return back to PL/SQL button

    Hello

    I implement a POS interface in oracle forms 6i and I am confused on how to create the function of BACKSPACE button pl/sql. I've added to the trigger WHEN the BUTTON PRESSED:

    SELECT substr (: system.current_item, 1, (LENGTH(:system.current_item) - 1))
    IN lv_return
    DOUBLE;

    The problem is that I failed to get a dynamic reference to my currently (selected) item on the duration. Is that I get as a value, not a reference, where I can assign the value of lv_return from above.
    Any suggestions?

    Thank you.
    DECLARE
      vcValue VARCHAR2(2000):=substr(NAME_IN(:system.trigger_item), 1, LENGTH(NAME_IN(:system.trigger_item)) - 1);
    BEGIN
      COPY(vcValue, :SYSTEM.TRIGGER_ITEM);
    END;
    
  • Reset of the variable defined by guest presentation

    I have 2 guests, State and City, led by a single button print. The State guest sets a variable of presentation called STATE_VAR and filters prompt City column values from list of choices based on the STATE_VAR and sets its own presentation CITY_VAR variable when the user selects a choice in the list. The two guests have flaws - STATE_VAR fast by default to a specific State in the initial page loads and the CITY_VAR defaults to nothing (no option in quick dialogue).

    This question I want to address is reset the variable of CITY_VAR presentation (in the default value, no option in the quick dialog) when the user selects a different State in the guest of the State . The sequence I want to reach is listed below.

    (1) on page load STATE_VAR and State quick choice are defined in Michigan and the CITY_VAR and the town guest are set to nothing (White option)
    (2) user selects Detroit as one of the cities in the prompt the City and click on the GO button.
    (3) the loading of the page, the presentation of STATE_VAR variable and corresponding State guest are set in Michigan, but now the guest of CITY_VAR and the City are now set in Detroit
    (4) the user selects a different option in the State prompt, say Nebraskaand click on the GO button
    (5) after loading the page, the presentation of STATE_VAR variable and corresponding State guest are now defined in Nebraska, however, the default option selected in the rapid City and corresponding CITY_VAR variable of presentation are still Detroit , although the choice list now contains different values.

    Is there anyway to restore the prompt of the CITY_VAR and the default City Nothing (no) selected state, essentially reset the variable of presentation?

    Thank you.

    I fear... you will not be able to achieve...

    The best thing you can do is check the box store in the guest of the city...

    Thank you
    Ashish

  • Change the value of the Variable presentation

    Hello
    If I want to change the value of the variable presentation, where I can change. Means that I need to check the value of the variable presentation and then I need to change the value of the variable presentation.
    I need help from anyone.
    Thanks in advance.

    When all the choices is selected past the value zero in the variable of presentation...

    Why not consult especially column by making it is fx as a presentation...

    in any case, if need be like that you can't pass null (persons) to your title. You should change it accordingly...

    create a column in the criteria, changing it is fx to: case when ' @{Pers_Var}' is null then 'people' else ' @{Pers_Var}' end

    Call the location of the column with the text in narrative mode, then add it to made available...

  • Capture of variable of presentation in a dash of the text object

    Hi all

    I have three requests on a dashboard page and you want to display a common title (the dashboard page name) for this page. As such, I would like to capture, the value of the variable presentation. for example

    The dashboard page name - year - @{PV_YEAR} {} - week - @ {{PV_WEEK}}. This will serve as the title of the page dashboard, other than securities of individual request.

    I tried key by using the dashboard of text object, but could not find happiness. Is it possible to capture variable presentation in a dash of the text object?

    I can capture this variable of presentation for the title of individual applications and display three times on the dashboard page. But as it's the same title, I want to display only once.

    Has anyone done any workaround? Any suggestion would be appreciated.

    Thanks and greetings

    Aniket

    Hi Aniket,

    I'm surprised that with the presentation in an object variable text on a dashboard does not work.
    It works for me...

    But if you can not solve, you can create a separate report with only the columns of the year and the week and filter these columns on the variable of presentation.
    Use only the narrative view, and then delete all the other views.

    Kind regards
    Stijn

  • .chm TOC using variables - print SSL does not recognize anything after the variable

    Here's something interesting that I came across today.  I think that maybe it's a bug in RH 10.

    I create .chm TOCs using variables.  For entries of table of contents of page, a content before the variable in the table of contents entry converts to the table of contents printed without problem.  But any content after the variable is ignored.  It's only a problem with the pages in the table of contents.  Books are very good.

    For example:

    Book TOC:

    "Clinic - {variable} {variable}.

    This translates very well to the table of contents printed in printed documentation SSL.

    Table of Contents Page:

    "Clinic - {variable} {variable}.

    Aside from the link in the table of contents page, the code for the TOC book and page table of contents is the same.  But, for some reason, anything after the * first * variable in the page table of contents is ignored in the table of contents printed for printed documentation SSL.  It doesn't matter if it's another right or variable text.

    printtoc_variablesbug.jpg

    In the image above, both the "clinic - display the list of participants in the" book of the TOC and TOC page on the left contains two variables:

    "Clinic - {variable} {variable}.

    On the right page "Clinic - Participant list", the variable "screen" is ignored and deleted page table of contents only when the layout of the chapter is created for printing SSL.  HR will remove anything after the first variable in the table of contents page, whether it's a text variable or right.  HR does not remove the antything of a book TOC when the presentation of the chapter is created for printing (visible in the picture above).

    Post edited by: eeddings - added image to visually show the bug.

    When you generate print books will go in the printed document.

    Pages in the table of contents of the document are not based on what is in the table of contents above, but on the topic title.

    Add the variable there and it works.

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • during the passage of presentation filter operators varibles takes as "equal" operator

    Hi experts,

    Please help me...
    My requirement is to display two reports using a command prompt
    1. a report must display based on the quick selection and the
    2. second report should be displayed excluding the quick selection.

    so, I created a prompt with the neighborhood market, produced and created the variables of presentation for them and used in the second report (Please find the img: https://picasaweb.google.com/obieegraphs/Prompts#5567705759580587890)

    I created the first report, a normal report by asking the fast values by using the operator "is asked. (Please find the number: https://picasaweb.google.com/obieegraphs/Prompts#5567708538685990114)
    in the second report, I created the report as normal and last presentation with the filters variables using operator ' is not equal to / is not "(please see here: https://picasaweb.google.com/obieegraphs/Prompts#5567712256152631874)

    When I put all together in the dashboard displays well the first report and the second report shows based operator on the "is equivalent to / is in", where as it should have been posted based on the operator "is not / is not.

    the report displays the operator based on the ' is equla to / is in "regardless of which carrier was used in the filter.
    Could someone help me on this?

    Thanks in advance,

    Hello Mani,

    Click on protect the filter in the second section of the report filter.

    The output will be: http://i54.tinypic.com/8yg8c2.jpg

    Thank you
    Saichand.v

Maybe you are looking for