Creating reports in BI EE from PL/SQL query

Please provide me solution of how to create reports in Oracle BI EE tool while using PL/SQL query block.
Thanks
Rajni Sharma

Narender Singh wrote:
Dear All,
We are using Oracle APPS, we have two tier structure.I bet it is actually 3-tier & WebServer exists
1) Application Tier
2) Database Tier
My requirement is to run a PL/SQL script to create directory structure in Unix box of Database Tier. I would be very grateful to person proving the input related to the same.
I want to create directory structure to store different type of files.
/usr/tmp/2000/jan/file1
/usr/tmp/2000/jan/file2
/usr/tmp/2000/jan/file3
/usr/tmp/2000/jan/file4
similarly, I have to create directory structure from year 2000- 2011 and for each year I have to 12 folder for months and then for each month I can have n number of file folders.
We are using 11g database.
Thanks in Advance!!
Regards,
Narender
Edited by: Narender Singh on Aug 9, 2011 10:50 AMDBMS_SCHEDULER that invokes OS shell script

Similar Messages

  • Get Number of rows from a sql query.

    I am reading data from a sql query in a BLS transaction and I would like to know the number of rows returned.
    Is there an easy way to do this without looping through the table?
    Thanks Jasper

    Hi Jasper,
    You can use the XPATH count function similar to  this:
    GetTagList.Results{count(/Rowsets/Rowset/Row)}
    Kind Regards,
    Diana Hoppe

  • Retreiving a value from and SQL query

    If anyone can give me sample code or pointers to retreive a value from an sql query, I'd be greatful.
    Source code I've muddled together so far:
    Class seqNumType = Class.forName(nameOfClass);
    Constructor theConstructor = seqNumType.getConstructor(null);
    Object seqNumInstance = theConstructor.newInstance(null);
    String theStatement = "SELECT value INTO v_seqnum FROM DUAL;";
    OracleCallableStatement ocs = (OracleCallableStatement)conn.prepareCall(theStatement);
    ocs.registerOutParameter( 1, OracleTypes.NUMBER, 0);
    Method method = seqNumInstance.getClass().getMethod("getORADataFactory", null);
    seqNumInstance = ocs.getORAData(1, (ORADataFactory)method.invoke(null,null));
    ocs.execute();
    Problem with this seems to be the ORADataFactory isn't a method of the class, but as I'm thumbling around in the dark here a little, I've no idea where to go from here. Is this just generally overkill anyway?
    Suggestions?
    Cheers for any help.

    Like this:
                ResultSet resultSet=statement.executeQuery("SELECT * FROM TEST");
                while(resultSet.next())
                    for(int i=0;i<resultSet.getMetaData().getColumnCount();i++)
                        System.out.print(resultSet.getObject(i+1).toString()+" ");
                    System.out.println();

  • Re: How to converting from PL/SQL query to T-SQL query

    How to converting from PL/SQL query to T-SQL query... Its Urgent

    Download the
    SQL Server Migration Assistant for Oracle.  It will convert whole Oracle databases, or single queries or PL/SQL stored procedures.
    With caution that If your database is using Collation which is case sensitive SSMA will not work.SSMA doesnt guarantees 100% for conversion of Queries/stored proc /database if it fails to do so for some queries you will have to do it manually.
    But you can try
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • How to open report in the browser from PL/SQL procedure

    Hi,
    I need to call the report (with destype = SCREEN) from the PL/SQL procedure and display in the browser.
    For Example: when I call P_call_report procedure in my Forms6i button or at sql*plus, the report output PDF/HTML should open in the Browser window.
    Iam Using IE, report6i, forms 6i, Oracle 8.1.7, Windows OS
    I tried using UTL_HTTP(' ') in a procedure. But when I execute the procedure at sql*plus it says Pl/sql procedure completed successfully message without opening report output in the browser window. If I copy the same url and paste it in the browser, it works.
    Please let me know if there is any solution.
    thanks alot.

    I guess event driven publishing may work. But Iam not sure about the opening of the browser from inside the procedure.

  • Last Result from Fulltext SQL Query Search Not Showing

    I am creating a custom search results page for MOSS 2007 (using inline .aspx code - don't ask) that uses Fulltext SQL Queries.  I get the results in a ResultTable (see code below) and then use a DataTable to write code to display it (I could have used
    a DataGrid, I know).
    The problem is that the last result is not showing. So, if it reports that there are 5 results, only 4 will show. I have verified that all 5 results do exist (using a slightly broadened query). If it reports 1 result, none exist in the DataTable that loads
    the result data from the ResultTable.
    FullTextSqlQuery query = new FullTextSqlQuery(site);
    query.ResultTypes = ResultType.RelevantResults;
    query.QueryText = qry;
    query.RowLimit = 50;
    query.StartRow = iPage;
    try
    ResultTableCollection results = query.Execute();
    ResultTable resultTable = results[ResultType.RelevantResults];
    DataTable table = new DataTable();
    table.Load(resultTable, LoadOption.OverwriteChanges);
    int n = resultTable.TotalRows;
    The variable "qry" is a valid SQL Query with the relevant clauses.
    I am using a foreach loop to go through "table" (a DataTable), and so I do not think that I have a "one-off error".
    Any suggestions would be most welcome.

    So in results you have all items but when you are loading it into table (type DataTable) you are loosing one last record.
    1) First you check what data you are getting in resultTable - as you are specifying RelevantResult
    2) Check last index of data in ResultTable collection and try to find out the last index ResultTable, or try to find last index of data in result table
    DataTable.Load method accepts parm of type IDataReader and IDatareader, there are cases it looses records if not read properly..check below links
    http://stackoverflow.com/questions/8396656/why-does-my-idatareader-lose-a-row
    http://msdn.microsoft.com/en-us/library/system.data.datatable.load(v=vs.110).aspx
    <hr> Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL <br/> <b><a href="http://insqlserver.com">Everything about SQL Server | Experience inside SQL Server </a></b>-<a href="http://insqlserver.com">Mohammad
    Nizamuddin </a>

  • How i create report on sccm 2012 based on saved query or collection

     i tray to create report based in saved collection or query
    i copy query statement  and create new report example
    (select SMS_G_System_PRINTER_DEVICE.DriverName, SMS_G_System_PRINTER_DEVICE.Name, SMS_R_System.Client, SMS_R_System.IPAddresses, SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_PRINTER_DEVICE on SMS_G_System_PRINTER_DEVICE.ResourceID =
    SMS_R_System.ResourceId where SMS_G_System_PRINTER_DEVICE.Name >= "HP LaserJet" and (not SMS_G_System_PRINTER_DEVICE.DriverName >= "microsoft office") and (not SMS_G_System_PRINTER_DEVICE.DriverName >= "ZDesigner") and
    (not SMS_G_System_PRINTER_DEVICE.DriverName >= "Send To Microsoft") and (not SMS_G_System_PRINTER_DEVICE.DriverName >= "PDF Complete Converter") and not SMS_G_System_PRINTER_DEVICE.DriverName like "Microsoft XPS Document Writer"))
    i paste the query statement when i execute the query  appear error  as in photo in link  
    please help me 
    http://social.technet.microsoft.com/Forums/getfile/527879

    Your picture doesn't seem to work.
    Your query above is in WQL, however reporting uses SQL. You will need to translate the query to SQL first.
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Classic Report CSV output failed to parse SQL query

    Hi,
    I'm trying to get a CSV output from a classic report. I'm generating the report based on a PL/SQL block that will return an SQL query. But when i download the CSV excel just gives me a:
    failed to parse SQL query:
    ORA-00936: Missing expression
    and shows me the query that the application is trying to parse. I'm also using bind variables (page items) in the PL/SQL block that is returning me the SQL query. I think that the reason that it fails to parse the query is that the query that is shown in excel has no bind variable values.
    Anyone got any ideas?

    Hi Arif,
    run your page in debug mode and check out the SQL statement which is actually executed for the report. That might help to diagnose what is going wrong.
    If you wish you can also post the report SQL statement which is getting executed.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Report data  does not reflect the SQL Query?

    Hi,
    I have a report which does not seem to be processing all records returned from the database. When I run the SQL Query produced by crystal manually against the SQL Server all data is returned correctly in crystal not. Does this mean my links are not set up correctly in the Database Expert? or is there another issue, I use a Crystal Syntax selection formulae which is based on a couple of paramters to filter the database records.
    Help is appreciated
    K

    <p>I agree with Rahul on checking the record count on the report vs. the record count from the query.  Conditional suppression and Group selection formula will hide records that are actually being returned.</p><p>It sounds like (from your question) that you are using the database linking expert in CR.  You can also check the SQL that CR is sending by going to Database -> Show SQL Query... compare this with the query you are using for validation, this will give you some clues as to whether your linking structure has an issue. </p>

  • Unable to create visual composer table view from the Bex Query

    Hi
    I am trying to create the visual composer lay out from a Bex query. The Bex query contains a set of Key figures and a structure.
    These key figure and structure combination is forming a table in the query output. Key figure parameters are coming as rows and Structure parameters are coming as columns.
    example query out put:
    Total, HPC, FDS excel ICe etc are as Structure elements and coming as columns in query out put and
    Invoice value, Gross sale value, Efficient operations etc are as Key figure elements in query and coming as rows in query out put.
    But if I map this query to visual composer table view all these are coming as columns as given below.
    Total Invoice value ,             Total Gross sale value,    Total Efficient operations,      HPC Invoice vale,.........
    And if execute the query will giving the out put in single row.
    Can anybody help me out to map this in the row column format?
    Is it really possible to do in VC?
    I am using CE 7.2. The VC model I need to be embedding in BPM.
    Please help me to solve this issue. I completely stuck up this issue.
    Regards
    Sajith P
    Edited by: Sajith P on Aug 17, 2010 3:07 PM
    Edited by: Sajith P on Aug 17, 2010 3:15 PM

    Hi,
    Try to use some function module which will convert query data into flat tables. (eg., RS_VC_GET_QUERY_VIEW_DATA_FLAT).
    Hope this solves your issue.
    Regards,
    Vinay

  • Why some columns are not read into Power Pivot when reading data from a SQL query

    I have this SQL query that I want to use to read data to PowerPivot from:
    SELECT Score.FieldCount as fieldcount, Score.Record.GetAt(0) as predicted_gender, Score.Record.GetAt(1) as probability_of_gender,  Score.Record.GetAt(2)
    as probability_of_m,  
    Score.Record.GetAt(3) as probability_of_f,  Score.Record.GetAt(4) as customerkey
    FROM 
    SELECT * FROM dbo.myCLR1(
    dbo.MyCLR2('c:\fILES\MLSM.xml'), 
    'SELECT * FROM [dbo].[Customer]') Input
    ) Score
    After I click 'Finish' in "Table Import Wizard", I can only get 1 column (FieldCount) in Power Pivot window. Why don't I get the other 4 columns? If I save the result to a table I do get all columns but my goal is to dynamically present the result
    so that's not an option. Can anyone shed some light?
    Thanks,
    Chu
    -- Predict everything. http://www.predixionsoftware.com

    If I only pass in query as 
    SELECT * FROM dbo.myCLR1(
    dbo.MyCLR2('c:\fILES\MLSM.xml'), 
    'SELECT * FROM [dbo].[Customer]') Input
    I do get 2 columns (FieldCount and Record as shown below)
    -- Predict everything. http://www.predixionsoftware.com

  • Creating a directory via a jsp page sql query return

    Is it possible to create a directory based on the results of a sql query?
    i.e.
    My sql query returns application number 1234 for a building application (BC for short).
    Is it possible to create a directory /BC/1234
    It is then proposed to use an iframe to look into the directory so users can place and access scanned documents which are captured during the approval process.
    If so how?
    An example would be great.
    Jason

    Sorry hope your still around I've been away for a while. We've created a samber share to the file server where the documents are stored and mounted it within the web file directory. It works ok if there is an existing directory but if there isn't we want it to be created when the page looks for the folder. I've done this with an asp page it basically did a directory exist test first then create folder if it didn't. The problem is can't find an example of how to do the directory exist test then directory create syntax so an example of both would be great

  • Parse SQL: How to extract column names, table names from a SQL query

    Hi all,
    I have a requirement wherein a SQL query will be given in a text file.
    The text file has to be read (probably using text_io package), the SQL query needs to be parsed and the column names, table names and where clauses have to be extracted and inserted into separate tables.
    Is there a way to do it using PL/SQL ?
    Is there a PL/SQL script available to parse and extract column names, table names etc ?
    Pls help.
    Regards,
    Sam

    I think I jumped to conclusion too early saying it is completely possible and straight forward. But after reading through your post for one more time I realised you are not interested only in the column_names, also the table_names and the predicates .
    >
    SQL query needs to be parsed and the column names
    >
    The above is possible and straight forward using the dbms_sql package.
    I am pasting the same information as I did in the other forum.
    Check this link and search for Example 8 and .
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sql.htm#sthref6136
    Also check the working example from asktom
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1035431863958
    >
    table names and where clauses have to be extracted
    >
    Now this is the tricky bit. You can extract the list of tables by getting the sql_id from v$sql and joining it with v$sql_plan. But sometimes you may not get all the results because the optimizer may choose to refine your query (check this link)
    http://optimizermagic.blogspot.com/2008/06/why-are-some-of-tables-in-my-query.html
    and you can get the predicate information from the same table v$sql_plan but I will leave that area for you to do some R&D.
    Regards
    Raj
    Edited by: R.Subramanian on Dec 10, 2008 3:14 AM

  • Alphabetical fetching from an SQL Query

    Hello,
    When I fetch from the following query:
    v_sql := 'SELECT REFERENCE_NO, COMPANY_NAME
    FROM CONSULTANTS
    ORDER BY COMPANY_NAME';
    The company names are in alphabetical order
    Something like:
    A
    B
    C
    D
    etc..
    Z
    then AFTER the capital letters come the a, b c
    Z
    then
    a
    then
    b
    etc..
    Is there a way to have the lower case letters such as "a" come right after ALL the "A"s
    Then the b's come after the B's
    Thanks
    Doug

    SQL> select col from (
      2  select 'a' col from dual
      3  union all
      4  select 'b' from dual
      5  union all
      6  select 'd' from dual
      7  union all
      8  select 'C' from dual
      9  union all
    10  select 'B' from dual
    11  union all
    12  select 'A' from dual
    13  )
    14  /
    C
    a
    b
    d
    C
    B
    A
    6 rows selected.
    SQL> select col from (
      2  select 'a' col from dual
      3  union all
      4  select 'b' from dual
      5  union all
      6  select 'd' from dual
      7  union all
      8  select 'C' from dual
      9  union all
    10  select 'B' from dual
    11  union all
    12  select 'A' from dual
    13  )
    14  order by upper(col), col
    15  /
    C
    A
    a
    B
    b
    C
    d
    6 rows selected.Rgds.

  • Returning operation, table and column from a sql query

    Hi,
    I am working on Oracle 10g and i have to do achieve something like this.
    i have to create procedure or functions which will accept a SQL query and will return following :
    1).  Operation like 'SELECT', 'INSERT', 'UPDATE', 'DELETE' etc.
    2).  Column names
    3).  Table involved.
    One way to achieve this would be through hard parsing of string which might be time consuming. So do we have any in-built oracle package or function for the same job ?
    Regards,
    Vikas Kumar

    Check for DBMS_SQL package and DESCRIBE_COLUMNS procedure in that package.
    You might need a combination of this package and Hard parsing of the input string.
    For operation you can trim any space and brackets using TRIM function and then you can extrcat first 6 characters using SUBSTR for Operation.
    I have not worked or used DBMS_SQL so wont be able to help you much on this.
    Here is the link for DBMS_SQL
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sql.htm#i1026120
    Regards
    Arun

Maybe you are looking for