SQL for oracle Reports

Hi, I am having trouble developing an oracle report to return information from several tables. The information to be returned is an aggregate operator "Count" and several fields from the tables. I cannot get the sql to compile without error.
Does anyone know of a good website for oracle reports design with sql?

Hi,
Why not paste the SQL code along with the
error or send it to : [email protected]
Naresh
null

Similar Messages

  • Can we use Dynamic SQL in Oracle Reports ?

    Hi ,
    Can we use Dynamic SQL in Oracle Reports ?
    If yes please give some examples .
    Thanx
    srini

    I believe the built-in package SRW.Do_Sql is what you are looking for
    Example from the document:
    /* Suppose you want to create a "table of contents" by getting the
    ** first character of a columns value, and page number on which its
    ** field fires to print. Assume that you want to put the "table of
    contents"
    ** into a table named SHIP. You could write the following construct:
    DECLARE
    PAGE_NO NUMBER;
    PAGE_FOR INDEX NUMBER;
    SORT_CHAR CHAR(1);
    CMD_LINE CHAR(200);
    BEGIN
    SORT_CHAR := :SORT_NAME ;
    IF :CALLED = Y THEN
         SRW.GET_PAGE_NUM(PAGE_FOR_INDEX);
         SRW.USER_EXIT(RWECOP PAGE_FOR_INDEX
         P_START_PAGENO);
         SRW.MESSAGE(2,TO_CHAR(:P_START_PAGENO));
    END IF;
    SRW.GET_PAGE_NUM(PAGE_NO);
    CMD_LINE := INSERT INTO SHIP VALUES
                          (||SORT_CHAR||,||TO_CHAR(PAGE_NO)||);
    SRW.MESSAGE(2,CMD_LINE);
    SRW.DO_SQL(CMD_LINE);
    COMMIT;
    EXCEPTION
      WHEN DUP_VAL_ON_INDEX THEN
            NULL;
      WHEN SRW.DO_SQL_FAILURE THEN
            SRW.MESSAGE(1,FAILED TO INSERT ROW INTO SHIP TABLE);
      WHEN OTHERS THEN
           COMMIT;
    END;

  • Schema for Oracle Report Developer 10G Course

    Hi All:
    I took the course for "Oracle Reports Developer 10g" but I didn't copy the schema when I took the course.
    Now,I have the book "Oracle Reports Developer 10g: Build Reports Student Guide" but I look over the internet and I can't find the schema for this course.
    I needed the schemas for the following tables:
    CUSTOMERS
    ORDERS
    ORDER_ITEMS
    WAREHOUSES
    INVENTORIES
    PRODUCT_INFORMATION
    PRODUCT_DESCRIPTIONS
    ONLINE_MEDIA
    PRINT_MEDIA
    Any help or hint where I can find the sql scripts for this schema is greatly appreciated it.
    Yours,
    Frustrated.

    duplicate post. Also, check your post in the Reports-forum, there is already an answer.

  • Pl/sql in oracle reports 6.0

    Hi ,
    I am new to oracle reports, is there any way to use pl/sql in oracle reports.I mean i have to take aggregate data from Oracle and to print/populate the data according to slabs(Say distance slab or time slab).Can u please provide me sample code...
    mail id : [email protected]
    thanks & regards
    Anand M

    you can use ref cursor in your pl/sql stored procedure and then call it in your reports

  • Help with Sql for Annual Report per month

    Hi, I have been given the task to create an annual report by month that would show company's profits per month and totals in the last column to show which branch had the hightest income.
    Branch||January||February||March||April||May||June....||Total||     
    ABC ||$0.00 ||$0.00 ||$0.00||$0.00||$0.00||$0.00||Total Amt||
    DEF ||$18.01 ||$3.88 ||$18.01||$4.12||$18.01||$3.97||Total Amt||
    Can anyone please help me in giving an idea of how to write sql for this report..? I am building sub-queries for everymonth by giving the dates for Jan/Feb/March..but I think this is not the right way to do this....
    SELECT
    sum(a.commission) December,
    sum(b.commission) November
    FROM
    Select
    c.account_id,
    c.officer,
    c.account_product_class_id,
    sum(c.dp_monthly_premium) Commission
    From
    contract c
    Where
    c.account_id=109 and
    c.status='APPROVED' and
    c.protection_effective between '01-DEC-2009' and '31-DEC-2009'
    Group by
    c.account_id,
    c.officer,
    c.account_product_class_id
    ) a,
    Select
    c.account_id,
    c.officer,
    c.account_product_class_id,
    sum(c.dp_monthly_premium) Commission
    From
    contract c
    Where
    c.account_id=109 and
    c.status='APPROVED' and
    c.protection_effective between '01-NOV-2009' and '30-NOV-2009'
    Group by
    c.account_id,
    c.officer,
    c.account_product_class_id
    ) b
    I always have hight hope from this forum. So please help. Thanks in advance.
    Edited by: Aditi_Seth on Jan 26, 2010 2:29 PM

    You may try a group report on one simple query like:
    Select
    c.account_id, c.officer, to_char(c.protection_effective, 'MM') month
    sum(c.dp_monthly_premium) Commission
    From
    contract c
    Where
    c.status='APPROVED' and .....
    Group by
    c.account_id
    c.officer,
    to_char(c.protection_effective, 'MM')
    break/gropu on account_id, c.officer, to_char(c.protection_effective, 'MM') and total will be automatically calculated by Reports.

  • Can we add Basic Authentication for Oracle Report 10g?

    As we know, Apache supports basic Authentication, and Oracle Report 10g bases on Apache, that means Oracle Report 10g supports Basic Authentication too?
    Can anyone tell me the steps on how to configure Basic Authentication for Oracle Report 10g?
    Thanks for your help in Advance!
    P.S.
    I tried to add the following content to the file "httpd.conf" under the directory "E:\OraHome_2\Apache\Apache\conf\" (I installed report under this folder), but it doesn't work well:
    <Directory "E:\OraHome_2\Apache\Apache\htdocs">
    AuthType Basic
    AuthName "Private Documentation Repository"
    AuthUserFile "C:\Program Files\Apache Software Foundation\Apache2.2\mypasswd"
    Require user yangsun
    </Directory>

    Answers at your duplicated thread --> Some inter view Questions Please give prefect answer  help me

  • Technical Documentation Tool for Oracle reports ---?

    Hello All,
    Are there are any technical documentation tools available for Oracle reports...similar to the one available for Oracle forms(FoReDocLet 1.1). In any kindly specify.
    Thanks & Regards,
    Arun.v

    HI Arun
    where can we get this forms documentation?
    Thankyou
    Sasi

  • Help forum for oracle report builder

    Dear all;
    I have searched all over the oracle website but I cant find a forum for oracle report builder. All help is appreciated.

    Try this forum:
    Reports

  • OCI for Oracle Reports

    Does anyone know if an OCI for Oracle Reports is available for Pro C/C++? If so where is it documented and how is it used?
    Thanks,
    Emad

    user4594420 wrote:
    Oracle7 for windows and OracleClient7 (oci.h, oci.o and others) for linux ?That would imply a really old version of windows (db side) and linux based os (client side). Perhaps SCO Unix was the only certified combination back then.
    You should talk to someone who can verify platform/system requirements.
    For the client side you might want to consider using a later Client release, a more recent old version (e.g. 8.1.7) that could talk to a Oracle7 server and work on your linux platform. There's a interoperability matrix on Metalink/MOS.

  • Executing psadmin.sql for Oracle

    I am trying to insatll Peoplesoft using Oracle 10g Release2,Websphere,Tuxedo 9.1, PeopleTools 8.49 and FSCM9.0.
    I have successfully installed Oracle 10g, Websphere,Tuxedo,Peopletools and FSCM9.0.
    Now, when I am trying to create database from C:\PT8.49\setup\PsMpDbInstall\setup.exe, the Installer after asking the paths get stuck in "Executing psadmin.sql for Oracle" for more than 2 days.
    I read in other threads that some people could resolve this by running the scripts manually. If that is the solution can anyone please help me with the scripts in sequence.
    Thanks in advance!!!!

    Peoplesoft database wizard for Oracle was/is a quite buggy. You should follow the Peopletools Installation Guide for the manual installation tasks instead.
    All the steps can be found in the doc :
    http://download.oracle.com/docs/cd/E05406_01/psft/acrobat/hwtools849_itora.pdf
    If it is not clear, you can have a look to my blog (see my profile), I tried to explain simple as possible the main steps.
    Nicolas.

  • Avery Label templates for Oracle reports

    Does anyone have or know of pre-defined templates for Oracle
    reports that are setup for Avery Labels?
    Thanks in Advance.
    Chris Schneider
    http://www.awebguru.com
    [email protected]

    I'm sorry, but Pages won't correctly open the Avery templates with the .doc extension. They open, but all the formatting is lost. Just a blank page.
    I tried to chane extension to .template, as suggested by the Pages -Help window. That didn't work either.
    Talk about a daily necessity as a feature.

  • Pl/sql vs oracle reports 6i

    Hi I am new to oracle development.
    My requirement is to create a text file periodically reading data from oracle tables.
    the client wants me to use oracle reports 6i and create a text file. they actually do not have a requirement for a report or this report will not be used in nay other way.
    the final output should be text file.
    i feel using utl_file package creating the text file on the server is a much better option. for this i thought writing a stored procedure and scheduling this procedure.
    please suggest me how i should convince. please give me suggestions in this. thanks in advance..mohan

    A while back all reports were just text files, what is the difference between a text report and a text file? If Oracle reports can do it go ahead. If you think it is overhead spool it from SQL*Plus, which as well as being an ad hoc query tool is actually designed as a text only report writer. If you want to you can still use a stored procedure that returns a ref cursor and just print and format the output in SQL*Plus however its wanted.
    Don't use util_file, its more code, slower, complicated, you can't just use SQL, you have to loop (though for some reason many programmers seem to see this as an advantage), it can only access the server, Its more suitable for diagnostics, tracing and logging, things the DBA would be interested in, not for the end user or external system interfaces.

  • Using a SQL for Oracle in Microsoft Excel Query

    I am having the most difficult time (in fact, I can't get it to work) trying to use an SQL I created in Toad for Oracle. It works fine in Toad for Oracle...gives me all the data I need. I am trying to use it in Excel for users that don't know SQL or Oracle so they can use the query to extract data they need for Charts, Graphs, etc.
    Here is the SQL code from Toad for Oracle:
    /* Formatted on 2006/09/22 11:42 (Formatter Plus v4.8.6) */
    SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
           a_compl_summary.part_sequence, a_compl_summary.part_number,
           a_compl_summary.lot_number, a_compl_summary.alert_date,
           a_compl_summary.entry_date, a_compl_summary.NAME,
           a_compl_summary.MONTH, a_compl_summary.product_family,
           a_compl_summary.complaint, a_compl_summary.reportable,
           a_compl_summary.product_returned, a_compl_summary.case_desc,
           a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
           a_compl_summary.root_cause, a_compl_summary.corrective_action,
           a_compl_summary.region,
           rp_qa_reported_device_codes.reported_device_code,
           rp_qa_reported_device_codes.reported_dev_clarification,
           rp_qa_reported_device_codes.reported_dev_code_desc,
           rp_qa_patient_codes.patient_code,
           rp_qa_patient_codes.patient_code_clarif,
           rp_qa_patient_codes.patient_code_severity,
           rp_qa_patient_codes.description
      FROM chsuser.a_compl_summary,
           chsuser.rp_qa_patient_codes,
           chsuser.rp_qa_reported_device_codes
    WHERE (    (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= :date1
                 AND a_compl_summary.entry_date <= :date2
            AND (   a_compl_summary.product_family LIKE :pf1
                 OR a_compl_summary.product_family LIKE :pf2
                 OR a_compl_summary.product_family LIKE :pf3
                 OR a_compl_summary.product_family LIKE :pf4
                 OR a_compl_summary.product_family LIKE :pf5
            AND (a_compl_summary.region = :r1)
            AND (   a_compl_summary.NAME = :c1
                 OR a_compl_summary.NAME = :c2
                 OR a_compl_summary.NAME = :c3
                 OR a_compl_summary.NAME = :c4
                 OR a_compl_summary.NAME = :c5
            AND (a_compl_summary.complaint = :yorn)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl1
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl2
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl3
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl4
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl5
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
                                                                              :dc1
            AND (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
           )Can someone help me...maybe point out what I'm doing wrong.
    Note: I also tried creating this query in Microsoft Query (the simple way) and when I first create it...it works...But then if I go back in to edit the query, and refresh the query or try to Return data to Excel, it gives me a ORA-00936 error message.
    Why it works when I first create the query in Excel, I don't know. But I have to validate the queries I'm creating (SQL or not) and I can't validate it if every time I go into edit the query (which may have to happen; that's why I have to fix this before I can submit my validation).
    Anyway, any help would be greatly appreciated.

    Okay, I know I'm replying to my own threads here...but I want to add a little bit more information again.
    I was successful in figuring out that changing the :criteria to a ? worked.
    I tested this on 1 criteria at a time. Adding one more scenario ? at at time.
    It only worked up until about 3 scenarios of each criteria.
    Then when I refreshed the query in Microsoft Excel Query, I got an "out of memory" error, and then it ended up just erasing the SQL I had been using.
    Here's the SQL I had where it gave me this error. Am I possibly just making Excel work too hard? It just doesn't make sense because Toad for Oracle handled it in like 4 seconds. Which brings me back to an intial question I had. Can Excel use Toad for Oracle somehow?
    Here's the code:
    SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
           a_compl_summary.part_sequence, a_compl_summary.part_number,
           a_compl_summary.lot_number, a_compl_summary.alert_date,
           a_compl_summary.entry_date, a_compl_summary.NAME,
           a_compl_summary.MONTH, a_compl_summary.product_family,
           a_compl_summary.complaint, a_compl_summary.reportable,
           a_compl_summary.product_returned, a_compl_summary.case_desc,
           a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
           a_compl_summary.root_cause, a_compl_summary.corrective_action,
           a_compl_summary.region,
           rp_qa_reported_device_codes.reported_device_code,
           rp_qa_reported_device_codes.reported_dev_clarification,
           rp_qa_reported_device_codes.reported_dev_code_desc,
           rp_qa_patient_codes.patient_code,
           rp_qa_patient_codes.patient_code_clarif,
           rp_qa_patient_codes.patient_code_severity,
           rp_qa_patient_codes.description
      FROM chsuser.a_compl_summary,
           chsuser.rp_qa_patient_codes,
           chsuser.rp_qa_reported_device_codes
    WHERE (    (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
    AND (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= ?
                 AND a_compl_summary.entry_date <= ?
            AND (   a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
            AND (a_compl_summary.region = ?)
            AND (   a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
            AND (a_compl_summary.complaint = ?)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
               ))

  • Data Source for Oracle reports

    Hi,
    Can Oracle Reports support anyother data source. I am using
    Reports Server to invoke reports. The requirement is client
    passing the dat that have to come in the report. (The size of
    data can be high).So is there any method other than sending the
    data as parametes(which in this case is not feasible).
    The client is a browser.
    Regards
    Ravi

    hello,
    oracle reports 6i supports SQL, PLSQL and Express as datasource.
    for passing large amounts of data, a temporary table in the
    database would be most reasonable.
    regards,
    the oracle reports team

  • PL/SQL Portlet & Oracle Report 6i Server??

    Scenario:
    I have 2 portlet:
    a) PORTLET A (is a dynamic menu written in pl/sql)
    Each menu's choice run a report (via cgi) and output is HTMLCSS format.
    b) PORTLET B (written in ?????).
    Question:
    If possible to set the output of Oracle Report into PORTELT B???

    A while back all reports were just text files, what is the difference between a text report and a text file? If Oracle reports can do it go ahead. If you think it is overhead spool it from SQL*Plus, which as well as being an ad hoc query tool is actually designed as a text only report writer. If you want to you can still use a stored procedure that returns a ref cursor and just print and format the output in SQL*Plus however its wanted.
    Don't use util_file, its more code, slower, complicated, you can't just use SQL, you have to loop (though for some reason many programmers seem to see this as an advantage), it can only access the server, Its more suitable for diagnostics, tracing and logging, things the DBA would be interested in, not for the end user or external system interfaces.

Maybe you are looking for