Direct Database Request & prompts

Is it possible to use Prompts in a Request base on a "Direct Database Request". How do I access the prompt variables in my SQL query?

user643210 wrote:
Hi,
I am unable to get the data based on the prompt applied this way. Can u please tell how to get the data using prompt on dashboard?It has been outlined for you above.
Define a presentation variable using your dashboard prompt,
In your SQL in the direct request, filter your column using the value in the variable using :
where column1= '@{somevar1}'
where @{somevar1} is the name of your presentation variable.
To Debug why your are not getting results, have a look at the what value got substituted into the Physical SQL being sent to the the underlying database using the session manager.

Similar Messages

  • Reg-Direct database request Prompt

    Hi
    I have a direct database request I kept this report on dashboard with request date as a prompt
    the filter on the report is
    TRUNC(FCR.request_date) = TO_DATE('@{Date1}{07/23/2012}','mm/dd/YYYY').(Data is coming fine)
    but
    I wanted to show the data for the current_date on the dashboard "default"
    When I try to do
    TRUNC(FCR.request_date) = TO_DATE('@{Date1}{Sysdate}','mm/dd/YYYY') Its throwing an error.
    I am not sure whether we have to use Sysdate or Current_date.Please let me know how to achieve this.
    Thanks
    Edited by: user13545914 on Jul 23, 2012 2:27 PM

    Prompt should like this:
    1) Column->Date [IF you do any formula here, you have to do every place, in this case I'm not doing any formula]
    2) Operator-> is equals to is in
    3) Control-> Calendar
    4)Default to ->SQL Results
    use query like
    SELECT Time.Date FROM "Service - CRM Service Requests" where Time.Date=current_date
    This would show default value select as todays date
    5) Set Variable -> PS
    Call the PS variable in the report without any default value. this should work fine, once you get confidence and this approach start doing what ever you want.
    if you want you can try same scenario with couple of columns.
    Just relax and read all threads and do it.

  • Pv in Direct Database request

    Hi I have a report from Direct database request .My question is how to create a PV(Prompt) where I dont have that table in the front end.

    Check these links
    Direct Database Request & prompts
    http://108obiee.blogspot.com/2009/11/variables-in-direct-database-requests.html
    let me know updates
    If helps pls mark correct or helpful

  • Applying Prompt on Direct Database Request in OBIEE 11g

    Hi
    I am creating Analysis by using 'Direct Database Request' and i am executing SQL Query to direct Database i am NOT creating Business and Presentation Model in RPD. Now i have to apply Filters on Report. any idea how i can do that?
    Example:
    Prompt (filter) :   Year                 Employee Department
                              2011                    HR
                              2012                    IT
                              2013                    Finanical
    Employee Name |    Employee Age   | Gender  | Leave Status     |    Leave Type
    abc                            31                      male       on leave              Sick leave
    xyz                             39                    Female    on leave               Annual leave
    i want to filter by YEAR and Employee Department.
    Regards
    Baig

    NO!!!!!!!!!!
    You Direst SQL query should contain the url
    ex:
    SELECT COL1,COL2,
    '<a href=http://obiapps:9704/analytics/saw.dll?Go&Path=/Answers&path=%2Fshared%2FAppslink%20Dashboards%2F_portal%2FAppslink%20Dashboards%2FEmployee%20Department=Navigate&P0='+BUSINESS_GROUP_NAME+' target=_new>'+BUSINESS_GROUP_NAME+'</a>
    FROM TABLE
    then go for the column format
    Note: in MS SQL + is for concat, you might have to change based on your db.

  • Direct Database Request with Dashboard Prompt LOV Source

    I have complex Direct Database Request query having Dashboard Prompt. In Dashboard prompt I want to have LOV. But to create the DPrompt having LOV, I must have the table/column in Subject Area. How I can have table in RPD not connected or joined with any table in RPD?
    The idea is to do the reporting based on direct query with Prompt/LOV but do not want to include the prompt source table with other my main logical model which is used for other purpose.

    Hi Kishore
    Thanks for the reply but it is little less clear because I already have working Dashboard level prompt where
    1. Instead of LOV I type the value, use the Presentation Variable as Set Variable on Dashboard Prompt, say pDepartment
    2. Created direct database rqeuest query having where condition .. WHERE Department= '@{pDepartment}'
    And the above Dashboard works great. Only problem is that I want to have LOV for Department for which I need to have the respective table/column in RPD
    I liked your idea about BI publisher but how do you really deploy the BI Publisher?
    Thanks
    OBIEEFAN

  • Multi-select prompts in Direct Database Request

    Is it possible to pass multi-select dashboard prompts to direct database requests?
    I have a report based on direct database request that needs the ability to run for all customers or the selected combination of customers.
    For example:
    select customer_name, sum(quantity)
    from orders
    where customer_name = '@{pCustomerPrompt}'
    group by customer_name;
    Here pCustomerPrompt is a multi-select prompt for customers.
    Thanks,
    Aravind

    I am not sure exactly whether it could be possible..
    One info I can share you is: we cannot assign a Presentation Variable to a Multi-Select prompt...

  • Date format in Direct database request

    I have a report with direct database request.
    I have a date prompt..I am storing the date in a Presentation Variable named pv_date.
    In the direct database request, I have a where clause:
    WHERE business_date IN ( @{pv_date}{'1/1/2013'} )
    when I run open dashboard for the first time, its throwing me an error near TIMESTAMP.
    WHERE business_date IN( TIMESTAMP ''2013-01-01 00:00:00'')
    AND ALSO When I run this report from dashboard after choosing a date say 2/20/2013, I see the query as:
    WHERE business_date IN (2013-02-20 00:00:00)
    and hence throwing error.
    Its throwing error in both the cases. How do I change the format in WHERE clause..
    Ideally, I want the query to be WHERE business_date IN ('2/20/2013') or Business_date IN ('2013-02-20')

    Thank you both.
    I am using Sybase and hence used convert function.
    But still I see the word TIMESTAMP in the query which is causing issue.
    business_date IN(CONVERT(char(10), TIMESTAMP ''2013-03-27 00:00:00'',101))
    and when I run the report by choosing any date, I see this: business_date IN(CONVERT(char(10),2013-03-27 00:00:00,101)) ; throwing error because No single quoted for the date.
    How do I remove the word TIMESTAMP?? and how do I impose single quotes..

  • Use of Filter in Direct Database Request for Custom Navigation

    Because of union and other complex sql code I am using Direct Database Request. (DDR) In 1st request based on DDR containing column Region, I need to do Region column value navigation to the Target report. The Target report is also based on DDR and has column Region.
    For 1st Report Region Column Value Navigation to work
    1. I did activate value interaction in 1st Report for Region column and set Target to Report 2.
    2. In 2nd Report, I have to use Filter and make region column "Is Prompted". But in DDR the filter is not available. How do I solve this problem?

    by using Direct database request your bypassing all the wanderful metadata you built in the BMM layer, as such much functionality is not available.
    If you really need to use such complex SQL, I would suggest creating an inline view in the phyiscal layer and at least model this through your BMM either as a flat data source (ie include the dimension columns and model the same inline view into your BMM star)
    If you do that, the BI Server will know what other logical columns this data source can relate you and you should find the navigation works as expected.
    If you dont fancy that good practice, have a look at creating GOURL formulas as the column fx's, format as HTML to present the data as a hyperlink and manually pass all the parameters to the 2nd report.
    I'd do the first option, its more inline with intended use.
    What cant you do using the 'normal modelling / answers techniqes with union (see combined request in answers) and complex sql (evaluate function in RPD)??

  • Direct Database Request

    Hi All,
    I am trying to set up a Dashboard Prompt using the SQL results of a Direct Database Request. I am using Oracle 11g.
    So far I have created the connection and created the analysis using the Direct Database Request. I am using Presentation Variable to pass into the Where Statement to filter however, I need a Dashboard prompt that will display the results of a particular column (country) in the Choice list options for filtering. I have tried to go into Dashboard Prompts and create a presentation variable and then use a SQL statement to render results for the prompt choices but that does not seem to work. Does anyone have an suggetions on how to Populate a Dashboard Prompt using Direct Database Request?
    SQL CODE FOR DASHBOARD PROMPT
    SELECT COUNTRY_CODE FROM POA_ADDRESS_DIM

    Thats Srini,
    I already have that presentation variable in my analysis in the where clause to limit the data request. The issue I am trying to resolve is similar to creating a filter based on another analysis.
    I created an analysis using DDR the DDR results is what I want to incorporate into a dashboard prompt. So the best logical way to put it is Take the results from a DDR and place it into a Dashboard Prompt as user choices. An added bonus if I could make the presentation variable pick up multiple selections from the Dashboard prompt. I know we could change the operator to IN however the formating of the choices would have to be something like this ('@{PV_COUNTRY}') <--- minus the paranthesis.

  • Direct Database Request - Add Drop Down List

    Hi,
    I have created a direct database request and would like to represent the output in table format. How can I add a page drop down filter, I would like to move two columns as page drop down lists and also be able to view the columns in the table.
    I know how to acheive this with a pivot table, but can this also be done with a table layout?
    Thanks

    Here is the answer to your specific question: No, you can't do "page drop downs" in Table View. You will have to use Pivot Table as described in previous posts.
    You will have to use dashboard prompts to get your choices. You are probably saying, "but dashboard prompts must be built on a Subject Area column and I can't select it because I am using a direct database as my source. So how do I create the prompt?"
    Good question. My question is, on the columns that you need as the "drop down filters," are those columns in any existing Subject Area? I know that your request is built by direct database, but if the specific column you need for your dashboard prompt can be found in a Subject Area, then you can use that Subject Area on which to build your dashboard prompts.
    You can add a WHERE condition in your direct database to receive the presentation variables. Read below to learn how:
    http://108obiee.blogspot.com/2009/11/variables-in-direct-database-requests.html

  • Using Filters in Direct Database Request

    Hi,
    I am creating my report table using direct database request option. Now i want to filter the column values. But in Direct Database Request report OBIEE is not giving option for filtering i.e. filter Add Filter button is not visible. How can i do it?
    Thanks
    Aasim Khan

    Actually i can not hard code these values in my SQL. I am using variables in my SQL to give where clause condition. But how can i set these variables? The actual scenario is that i have a report table. When i clicked some column of this report i have to navigate to another report and pass some value of clicked row to the next report. On the next report SQL i have defied a variable in my where clause. But i am unable to set this variable when i clicked on some row link. So how can i achieve it in direct database request report?
    In normal answer report all values of the clicked report are passed to the next report, and in the next report we mention filters with "is prompted" option to apply the selected values. But in Direct Database Request report we do not have this filter option. So can anybody explain how can i update variable values in the above mentioned scenario.
    Thanks,
    Aasim Khan.

  • OBIEE 11.1.1.6.8 Direct Database Request

    I have created a report using direct database request and created a filters using Presentation variable as prompt
    However All choices from Prompt is not capturing but for any value its working fine. Please let me know how can we do for All choices with DDR
    Thanks
    NK

    you can't pass all the choices to direct database request because direct database and here there is no relationship with existing subject area. So only one dynamic value can pass from prompt else you can hardcode the values in the bind variable. For this please refer my link https://forums.oracle.com/thread/2562814

  • OBIEE Answers Direct Database Request

    The issue is that I want to link two reports created using Direct Database Request. i.e. when I click on a column of Report A I should be directed to Report B with the filter passed from Report A. The issue that we are facing is that we can access the presentation variables in Report A, but are unable to pass them to Report B.
    Any Idea ?
    Regards,

    we can access the presentation variables in Report A, but are unable to pass them to Report B.
    If you are not using the prompts, How can you refer a Presentation Variable?
    GOURL can be implemented to Direct Database Requests...
    Go to Column Properties ==> Data Format ==>Check Override Default Data Format and Choose Custom .. Format
    Here specify the Go URL..
    For GO URL concepts, go through the link given by Christian..

  • OBIEE 10G Direct Database Request

    Hey Everybody,
    I'm on OBIEE 10G in a solaris environment and I'm connected to Oracle 11.2 database. I'm having trouble getting the correct dataset returned from a Direct Database Request from a dashboard that users input data. I have the dashboard created and have all the dashboard prompts setup as prestentation variables. My DDR sql looks like this:
    Select from table where Batch_ID = '11' and PID = '1234' and Reported_Date = '01011900'*
    My issue is that I want the Reported Date dashboard prompt to be a optional field that user do not have to enter on the dashboard. However, if a user doesn't enter a value on the dashboard then an error is thrown because the DDR sql is expecting a value for the Reported Date.
    I've tried to enter the OBIEE standard "%" as an all choices option in the database and changed the DDR sql to look like this:
    Select from table where Batch_ID = '11' and PID = '1234' and Reported_Date like '%'*
    However, this throws an error saying an unidentified characters has been used even though if I run this above sql query directly against the database myself it gives back the wanted dataset.
    Anybody ever ran across this situation before?
    Thanks,
    Jeff

    Here is the code I used as my DDR. When I leave the @reported_date prompt empty it doesn't return anything. Thanks.
    select Batch_ID_0,
    Batch_Seq_Nbr_1,
    AC_TL_Seq_Nbr_2,
    Contributor_ID_3,
    Account_Nbr_4,
    Account_Type_5,
    Account_Status_6,
    Opened_Date_7,
    Reported_Date_8,
    Closed_Date_9,
    Current_Balance_10,
    AC_Assoc_Seq_Nbr_11,
    ECOA_Code_12,
    SSN_13,
    Phone_Nbr_14,
    Birth_Date_15,
    Last_Name_16,
    First_Name_17,
    Middle_Name_18,
    Generation_Code_19,
    Line1_of_Addr_20,
    Line2_of_Addr_21,
    City_22,
    State_23,
    Zip_24
    From (
    Select Ac_Trade.Batch_ID Batch_ID_0,
    Ac_Trade.Batch_Seq_Nbr Batch_Seq_Nbr_1,
    Ac_Trade.AC_TL_Seq_Nbr AC_TL_Seq_Nbr_2,
    Ac_Trade.Contributor_ID Contributor_Id_3,
    Ac_Trade.Account_Nbr Account_Nbr_4,
    Ac_Trade.Account_Type Account_Type_5,
    Ac_Trade.Account_Status Account_Status_6,
    Ac_Trade.Opened_Date Opened_Date_7,
    Ac_Trade.Reported_Date Reported_Date_8,
    Ac_Trade.Closed_Date Closed_Date_9,
    Ac_Trade.Current_Balance Current_Balance_10,
    Ac_Assoc.AC_Assoc_Seq_Nbr AC_Assoc_Seq_Nbr_11,
    Ac_Assoc.Ecoa_Code ECOA_Code_12,
    Ac_Assoc.SSN SSN_13,
    Ac_Assoc.Phone_Nbr Phone_Nbr_14,
    Ac_Assoc.Birth_Date Birth_Date_15,
    Ac_Assoc.Last_Name Last_Name_16,
    Ac_Assoc.First_Name First_Name_17,
    Ac_Assoc.Middle_Name Middle_Name_18,
    Ac_Assoc.Generation_Code Generation_Code_19,
    Ac_Assoc.Line1_of_Addr Line1_of_Addr_20,
    Ac_Assoc.Line2_of_Addr Line2_of_Addr_21,
    Ac_Assoc.City City_22,
    Ac_Assoc.State State_23,
    Ac_Assoc.Zip Zip_24,
    row_number() over(order by Ac_Trade.batch_id) row_limit
    From owb.Ac_Trade, owb.Ac_Assoc
    Where Ac_Trade.Batch_Id = Ac_Assoc.Batch_Id
    And Ac_Trade.Batch_Seq_Nbr = Ac_Assoc.Batch_Seq_Nbr
    And (Ac_Trade.Batch_Id = ( @{batch_id}{'1'} ))
    And (Ac_Trade.Processor_Id = ( @{processor_id}{'1'} ))
    And (Ac_Trade.Reported_Date like (CASE WHEN '@{reported_date}{}' = '' THEN '%%' ELSE '@{reported_date}' END) ))
    Where Row_Limit <= 25
    Order By Batch_ID_0,
    Batch_Seq_Nbr_1,
    AC_TL_Seq_Nbr_2,
    Contributor_ID_3,
    Account_Nbr_4,
    Account_Type_5,
    Account_Status_6,
    Opened_Date_7,
    Reported_Date_8,
    Closed_Date_9,
    Current_Balance_10,
    AC_Assoc_Seq_Nbr_11,
    ECOA_Code_12,
    SSN_13,
    Phone_Nbr_14,
    Birth_Date_15,
    Last_Name_16,
    First_Name_17,
    Middle_Name_18,
    Generation_Code_19,
    Line1_of_Addr_20,
    Line2_of_Addr_21,
    City_22,
    State_23,
    Zip_24

  • Unable to Schedule a Direct Database Request in OBIEE 11g.

    Hi All,
    I am trying to schedule a Report that is generated using a Direct Database Request Query.
    Whenever I try to create an Alert for this specific Report it Fails to deliver.
    I checked the Job Manager for this Alert. I found out that the Job has completed with an Exit Code = 2 and there was no other error description for the same.
    Can we not create an alert for a Direct Database Request.
    Please let me know if anyone has dealed with such an issue and if anyone has a solution for this.
    Thanks in advance.
    Dev.

    Analyses based on direct database requests and sent out through agents work just like any other analysis in terms of content, delivery etc.
    Are you sure that you're not hitting a privilege problem and that the user executing the agents isn't allowed to run direct database requests?

Maybe you are looking for

  • Can no-one help me?

    Hi, I posted this a day or so agao but got no replies and after much messing about still have no answer. I have a fairly complex flex app which works fine. I then created a new mxml component and added some view states to it, at this point I get the

  • How to auto boot after shutting down bootcamp Windows?

    I have an instructional lab of 30 20" imacs that are running dual-boot, 10.5 & XP SP3. They have bootpicker installed to simplify the selection of which OS to boot to and auto-select Windows at 60 sec. (This is for new computer users and English as a

  • How to erase TM?

    I need to erase TM but don't know how. It doesn't appear in Disk Utility. I installed a new 1.5TB internal HD and made it my startup disk. I had no problems cloning the old startup disk(500GB) to the new one and everything works fine. The only proble

  • ABAP Coding issue

    Hi Abapers, I am new to ABAP, I am in the process of learning. I want to do IF KNVK-PAFKT = Z1 select single smtp_addr FROM adr6 INTO v_smtp_addr                           WHERE ADDRNUMBER =   v_adrnr. Endif. But i am able to get the EMail without IF

  • Generate PDF not including an image

    The XDP version of a form displays correctly but when the generate PDF step in a process is done one of the images is not included. In designer the display as PFD tab works fine. I've recreated the PDF from the XPD, I've removed the image fragment, a