You are currently viewing SQL to fetch 200+ rows – Direct Database Query – Obsolete
SQL to fetch 200+ rows – Direct Database Query – Obsolete

This article is obsolete now as Oracle removed Direct Database Query option.

Please check out the alternative to run adhoc queries.

When we create a Data Model using SQL Query, the max number of rows that we can fetch using the Data Model is only 200 rows unless we create a layout, tag it to data model and run the report.

Many a times, we would need to run queries on ad-hoc basis and need to get the complete output (More than 200 rows).. In these cases, we cannot waste time creating template and report each time. So, Instead of creating Data Model, we can use the Create Direct Database Query feature of Analytics to achieve this requirement.

1) Navigate to Reports and Analytics

2) Create > New> Analysis

Instead of Subject Area, select the Create Direct Database Query as shown below;

direct - SQL to fetch 200+ rows - Direct Database Query - Obsolete













3) On the Criteria tab
 a. Connection Pool = For HCM   use “HCM_OLTP”.”Connection Pool” (Quotes are mandatory)

                                    For FSCM use “FSCM_OLTP”.”Connection Pool”
                                    For CRM   use “CRM_OLTP”.”Connection Pool”
 b. SQL Statement = SELECT Last_Name from PER_PERSON_NAMES_F
4) Then Click on “Validate SQL and Retrieve Columns” which will return the columns selected by the query. We can do the field formatting if required by clicking the column properties.

direct2 - SQL to fetch 200+ rows - Direct Database Query - Obsolete



5) Then click on Results tab to view the results. Data can be exported to multiple formats like pdf, excel, csv, xml, etc.

direct3 - SQL to fetch 200+ rows - Direct Database Query - Obsolete









6) If the requirement is to get the output in pivot table or bar graph, it can be achieved easily with drag and drop options by adding a new layout.

direct4 - SQL to fetch 200+ rows - Direct Database Query - Obsolete










7) The analytics created using this method can be added to dashboard just like other analytics created using subject areas. 

Use Cases: If we need to run a simple BI query to extract more than 200 rows / generate a report in pivot table or bar graph.

Pre-requisites: BI Admin role is required for the user to try this feature. 

If you have any questions, please feel free to reach out to me by posting in comments section.

If you are interested in learning Fusion Technical tools go through this post

If you liked the article, please share it with your friends/ colleagues/ teammates or anyone who might also benefit from it.

  • Hello Charan,

    Thanks for posting such a great article for new learners/beginners.

    Could you please help us in know we can pass parameter in above same example which you have used to explain article ?

    In case we wish to use Value Sets like BI report then how that can be achieved ?

    Your help much appreciated.

  • Hi Sricharan,

    Good article, I am trying to setup same. I have BI admin role but I am not able to see “Create Direct Database Query” in Create –>New –>Analysis. Is there any other prerequisites are required?

    Thanks,
    Suresh

  • In visible box by plugintheme