REPORT WITH PL/SQL  CODE

DECLARE
SQ VARCHAR2(100);
BEGIN
SQ := 'SELECT * FROM EMP WHERE EMPNO=7788';
RETURN SQ;
END
THE ABOVE PL/SQL CODE WORKING FINE
BUT I NEED CONDITION BASED ON ENAME
SQ:='SELECT * FROM EMP WHERE ENAME=''SCOTT'';
IT IS GIVEING ERROR
WHAT TO DO?

Hi,
You're missing the final quote - you have the quotes for SCOTT but not the one to close the SQ string:
DECLARE
SQ VARCHAR2(100);
BEGIN
SQ := 'SELECT * FROM EMP WHERE EMPNO=''SCOTT''';
RETURN SQ;
ENDAndy

Similar Messages

  • Create a report with PL/SQL

    Hi,
    I have two pages: the first page contains two text fields and a submit button. In the first text field you can enter a name and in the second field you can enter a number. That means you can search a record by name or by number.
    In the second page the report is generated depending on the used text field of the first page.
    I tried to to define a region source code with PL/SQL for the report, but nothing appears on the report page although the record I was looking for exists in the database.
    begin
    if :ENTERNAME IS NOT NULL then
    FOR item IN (select "TB_PERSON_INSTITUTION"."PI_ID" as "PI_ID",
    "TB_PERSON_INSTITUTION"."PI_NAME" as "PI_NAME",
    "TB_PERSON_INSTITUTION"."PI_VORNAME" as "PI_VORNAME",
    from     "TB_PERSON_INSTITUTION" "TB_PERSON_INSTITUTION"
    where      upper("TB_PERSON_INSTITUTION"."PI_NAME") like upper(:ENTERNAME||'%'))
    loop
    DBMS_OUTPUT.PUT_LINE('First name = ' || item.PI_NAME ||
    ', Last name = ' || item.PI_VORNAME);
    end loop;
    end if;
    end;
    Regards
    Mark

    Hi,
    ok thanks. I tried to use the SQL-Report with type "SQL Query (PL/SQL function body returning SQL-Query)" and made a few changes in the SQL-Statement so that a second table is also included:
    declare My_select varchar2(500);
    begin
    if :TEXTEINGABENAME IS NOT NULL then
    My_select:='SELECT
    "TB_ADRESSE"."A_PLZ" "A_PLZ",
    "TB_ADRESSE"."A_ORT" "A_ORT",
    "TB_ADRESSE"."A_ID" "A_ID",
    "TB_PERSON_INSTITUTION"."PI_MITGLIEDSNUMMER" "PI_MITGLIEDSNUMMER",
    "TB_PERSON_INSTITUTION"."PI_NAME" "PI_NAME",
    "TB_PERSON_INSTITUTION"."PI_VORNAME" "PI_VORNAME",
    "TB_PERSON_INSTITUTION"."PI_ERGAENZUNG" "PI_ERGAENZUNG",
    "TB_PERSON_INSTITUTION"."PI_ERGAENZUNG1" "PI_ERGAENZUNG1",
    "TB_PERSON_INSTITUTION"."PI_ID" "PI_ID"
    FROM
    "TB_ADRESSE" "TB_ADRESSE",
    "TB_PERSON_INSTITUTION" "TB_PERSON_INSTITUTION"
    WHERE "TB_PERSON_INSTITUTION"."PI_ID" = "TB_ADRESSE"."A_F_PERSON_INSTITUTION"
    AND upper("TB_PERSON_INSTITUTION"."PI_NAME") like upper(:TEXTEINGABENAME||"%")';
    else
    if :TEXTMITGLIEDSNUMMER is not null then
    My_select:='SELECT
    "TB_ADRESSE"."A_PLZ" "A_PLZ",
    "TB_ADRESSE"."A_ORT" "A_ORT",
    "TB_ADRESSE"."A_ID" "A_ID",
    "TB_PERSON_INSTITUTION"."PI_MITGLIEDSNUMMER" "PI_MITGLIEDSNUMMER",
    "TB_PERSON_INSTITUTION"."PI_NAME" "PI_NAME",
    "TB_PERSON_INSTITUTION"."PI_VORNAME" "PI_VORNAME",
    "TB_PERSON_INSTITUTION"."PI_ERGAENZUNG" "PI_ERGAENZUNG",
    "TB_PERSON_INSTITUTION"."PI_ERGAENZUNG1" "PI_ERGAENZUNG1",
    "TB_PERSON_INSTITUTION"."PI_ID" "PI_ID"
    FROM
    "TB_ADRESSE" "TB_ADRESSE",
    "TB_PERSON_INSTITUTION" "TB_PERSON_INSTITUTION"
    WHERE "TB_PERSON_INSTITUTION"."PI_ID" = "TB_ADRESSE"."A_F_PERSON_INSTITUTION"
    AND upper("TB_PERSON_INSTITUTION"."PI_MITGLIEDSNUMMER") like upper(:TEXTMITGLIEDSNUMMER||"%")';
    end if;
    end if;
    return My_select;
    end;
    When I try to apply changes an error message occurs:
    "Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. The query can not be parsed, the cursor is not yet open or a function returning a SQL query returned without a value."
    Regards,
    Mark

  • Any tool to search Crystal Reports with embedded SQL

    We have hundreds of Crystal Reports with embedded sql statements which have been developed over the years.  Is there any tool which will allow us to scan all of the reports to see which ones might use a certain table, or is using a "group by" clause, or whatever ?
    We'd prefer to not have to open each report to view the embedded sql.
    Any thing that will extract the sql for us and dump it to a file ??
    We have the reports as regular disk files, but they are also published to our Business Objects Enterprise XI R2 system (just an fyi in case there's an option on that side).

    Hi Wayne
    There is a sample ras sdk code here that might be if use to you
    Link: [https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/402f2b94-da66-2b10-c598-de0d4b6058dc]

  • XML Publisher Report with PL/SQL

    Hi
    Like to know how to develop the XML Publisher Report with PL/SQL, i did the following
    1. created a pkg like as below
    CREATE OR REPLACE PACKAGE BODY APPS.TEST_XMLTAG_PKG AS
    PROCEDURE main (errbuf OUT VARCHAR2,
    retcode OUT NUMBER
    ) IS
    BEGIN
    DECLARE
    ctx DBMS_XMLGEN.ctxHandle;
    xml CLOB;
    BEGIN
    ctx := dbms_xmlgen.newcontext('select * from scott.emp');
    dbms_xmlgen.setrowtag(ctx, 'MY-ROW-START-HERE');
    xml := dbms_xmlgen.getxml(ctx);
    dbms_output.put_line(xml);
    Fnd_file.put_line (fnd_file.LOG, XML);
    END;
    END;
    END TEST_XMLTAG_PKG;
    this pkg produces the output with xml tag in the view log.
    I have registered the conc program & xml rtf but it does not produce the output in PDF, , I am not able to get the xml tag when i click the Diagnostics --> View XML.
    can you please let me know the next steps involved.
    Regards
    Yram

    I think the problem is because there is no begin and end tag. save the xml from the logfile and open with xml editor or IE.. then you will see the problem.
    add Begin and end tag...then you should be fine.. i.e
    fnd_file.put_line(fnd_file.output,'<EMP_DATA>'); -- begin Tag
    tx := dbms_xmlgen.newcontext('select * from scott.emp');
    dbms_xmlgen.setrowtag(ctx, 'MY-ROW-START-HERE');
    xml := dbms_xmlgen.getxml(ctx);
    dbms_output.put_line(xml);
    Fnd_file.put_line (fnd_file.LOG, XML);
    fnd_file.put_line(fnd_file.output,'</EMP_DATA>'); -- End Tag
    Hope this helps..>Good Luck
    Ravi

  • Interactive Report with PL/SQL Function Source

    Is it possible to create interactive report with PL/SQL function source returing a query? If not, has anyone done any work to simulate the interactive reporting feature for a normal report using API?

    I haven't tried that before but you could:
    1. create a collection from your result set returned by a dynamic query,
    2. create a view on that collection,
    3. use the view in your interactive report.
    The usability of this proposal depends from a question how "dynamic" your query is - does it always have the same number of columns or not.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • MCTS 70-466 Implementing Data Models and Reports with Microsoft SQL Server 2012

    I am searching for training kit for Exam 70-466 (Implementing Data Models and Reports with Microsoft SQL Server 2012) but I think is not published yet. I was expecting its release in Jan or Feb 2014. Would any one can tell me its release date or any place
    where I can find this book.
    Thanks
     

    Hi Azhar lqbal Gondal,
    According to your description, since the issue regards training and certification,
     I suggest you post the question in the Learning forums at
    http://social.technet.microsoft.com/Forums/en-US/home?category=learning. It is appropriate and more experts will assist you. If you have a specific technical question about Microsoft SQL Server,
     you can visit and post your question on  the SQL Server Forum.
    There is some detail about Exam 70-466 Implementing Data Models and Reports with Microsoft SQL Server 2012, you can review the following articles.
    Exam content can be found here:
    http://www.microsoft.com/learning/en-us/exam-70-466.aspx
    http://borntolearn.mslearn.net/certification/database/w/wiki/525.466-implementing-data-models-and-reports-with-microsoft-sql-server-2012.aspx#fbid=Mn-t6aRhs-H
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Problem while creating XDO Report with PL/SQL

    hi,
    i am trying to create
    1.created XDO Report with the help of PL/SQL which takes two parameters and code for writing XML tags to output file
    2.created concurrent program that will call the PL/SQL pkg
    here i am trying to create the xml out put bu t i am stuck with some errors below is the code
    create or replace
    PACKAGE AgentTimeReport_XDO_pkg AS
    TYPE srdaterange_rec is RECORD (
    fromsrdate varchar2(20 byte),
    tosrdate varchar2(20 byte)
    Type agent_table IS TABLE OF srdaterange_rec INDEX BY BINARY_INTEGER;
    procedure GetAgentTimeList(o_errbuf  OUT VARCHAR2
                   ,o_retcode             OUT VARCHAR2,p_fromsrdate IN varchar2,p_tosrdate IN varchar2);
    END AgentTimeReport_XDO_pkg;
    create or replace
    PACKAGE BODY AGENTTIMEREPORT_XDO_PKG AS
      procedure GetAgentTimeList(o_errbuf  OUT VARCHAR2
                   ,o_retcode             OUT VARCHAR2,p_fromsrdate IN
    VARCHAR2,p_tosrdate IN VARCHAR2 )
    IS
    cursor cs_agenttime(p_fromdate IN VARCHAR2,p_todate IN VARCHAR2)
    is
    SELECT  
      incident.Incident_Number as ServiceRequestNumber,
      TO_CHAR (incident.incident_date,'DD-MON-YYYY') as ServiceRequestDate,
      incident.Summary as Summary,
      agenttime.agentname as AgentName,
      to_char(agenttime.agentstarttime,'DD-MM-YYYY HH24:MI') as StartTime,
      to_char(to_date('00:00:00','HH24:MI:SS') +
      (agenttime.endtime-agenttime.agentstarttime), 'HH24:MI') as TimeSpent 
    FROM cs_incidents_all_b incident,cs_agenttime_agv agenttime
    WHERE agenttime.incident_id=incident.incident_id
    AND incident.incident_date between to_date(p_fromsrdate,'DD-MON-YYYY')
    AND to_date(p_tosrdate,'DD-MON-YYYY');
      BEGIN
        /*First line of XML data should be ‘<?xml version="1.0" encoding='utf-8'?>’*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0" encoding="utf-8"?>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<AGENTTIME>');
    FOR cs_agent IN cs_agenttime(p_fromsrdate,p_tosrdate)
    LOOP
    /*For each record create a group tag <G_AGENT_TIME> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_AGENT_TIME>');
    /*Embed data between XML tags for ex:- <EMP_NAME>Abeesh</EMP_NAME>*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<SERVICEREQUEST_NUMBER>' ||
    cs_agent.ServiceRequestNumber 
                                    || '</SERVICEREQUEST_NUMBER>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<SERVICEREQUEST_DATE>' ||
    cs_agent.ServiceRequestDate ||
                                       '</SERVICEREQUEST_DATE>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<START_TIME>' || cs_agent.StartTime
                                     ||'</START_TIME>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<TIME_SPENT>' || cs_agent.TimeSpent
                                     ||'</TIME_SPENT>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_AGENT_TIME>');
    END LOOP;
    /*Finally Close the starting Report tag*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</AGENTTIME>');
      END GetAgentTimeList;
    END AGENTTIMEREPORT_XDO_PKG;any one help me
    the log file
    Service: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    DEMOXDO module: DemoAgentXDO Report
    Current system time is 28-JUL-2009 05:16:46
    **Starts**28-JUL-2009 05:16:46
    ORACLE error 1861 in FDPSTP
    Cause: FDPSTP failed due to ORA-01861: literal does not match format string
    ORA-06512: at "APPS.AGENTTIMEREPORT_XDO_PKG", line 9
    ORA-06512: at "APPS.AGENTTIMEREPORT_XDO_PKG", line 25
    ORA-06512: at line 1
    The SQL statement b
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 28-JUL-2009 05:16:46
    ---------------------------------------------------------------------------

    Hi,
    Please see if these documents help.
    Note: 367607.1 - FDPSTP Failed Due to ORA-01861: Literal Does Not Match Format String
    Note: 370272.1 - not able to run the report set having unsupported date format of fnd-date4
    Note: 376034.1 - How to Handle New Date Formats in SQL*Plus and PL/SQL Procedures?
    Regards,
    Hussein

  • Reports with custom SQL

    Hi all,
    is there a way to find out which Webi reports are running custom SQL?
    Basically we want to find this out without opening each report in edit mode.
    Thanks.

    Hi George,
    I encounter this issue OFTEN because I add custom SQL in many queries. The problem for me, as you may have encountered yourself, is when I go in and do a minor tweak a query by adding a field, the custom SQL is flushed away.
    Since WebI doesn't show this important information on the Document List, I have made it a habit to add a note to the document properties. (Right click on the document title and select Properties.) The properties will appear directly beneath the title on the Document List.
    My Document List looks like this:
    That's the solution I came up with. It reminds me that if I open a document to modify it in any way, I need to be careful not to lose my custom SQL code.
    Good luck,
    Marvin

  • Link a Crystal Report report with an SQL Azure database

    Hi,
    I want to use my database on SQL Azure in Crystal Report. So I want to link my reports with data contained not in a local db, but in a SQL Azure one.
    Insiede Crystal Report I have created a new ADO connection to my SQL Azure, providing server, db, user, password, and Crystal Report have recognized the database. But when I go to the Database Expert and I try to set this ADO connection inside my report,
    I recieve this error:
    "Not Implemented
    Source ADODB.Connection
    L'operazione richiesta non è supportata dall'oggetto o dal provider (operation not supported by the object or by the provider)"
    Why? How can i use my SQL Azure data in my Crystal Report reports?
    Thanks

    Hi Delfins,
    Please create a UDL file to test the connection, ensure the connection is fine and then use the same connection string in your Crystal Report.
    For UDL file, you can refer to:
    http://msdn.microsoft.com/en-us/library/e38h511e(VS.71).aspx
    Hope this helps,
    Raymond
    Raymond Li - MSFT

  • What is missing with Pl SQL code?

    Hey guys,
    I am learning out of this book, and the guy Has this bit of Pl/sql.....
    It executes immdiate.
    create table zed ( z varchar2(30);
    declare procedure thisway1
    (p_data in varchar2 )
    is
    begin
    execute immediate
    'insert into zed(z) values(:z)'
    using p_data; end thisway1;
    Is the code correct?

    FrankKulash wrote:
    Hi,
    XevBellringer wrote:
    Hey guys,
    I am learning out of this book, and the guy Has this bit of Pl/sql.....
    It executes immdiate.
    create table zed ( z varchar2(30);
    declare procedure thisway1
    (p_data in varchar2 )
    is
    begin
    execute immediate
    'insert into zed(z) values(:z)'
    using p_data; end thisway1;
    Is the code correct?
    No code is absolutely correct.  Code can be correct for a specific purpose, which means it will be incorrect for other purposes.  If that code was copied out of a book, the book probably explains the context, and why the author chose to use EXECUTE IMMEDIATE when it's not necessary.  (You should use dynamic SQL, such as EXECUTE IMMEDIATE, only when you really have to.  That's one of the most important things to learn about dynamic SQL.  Perhaps the book is using this code to make that point.)
    By itself, the PL/SQL code you posted will get a compilation error.  The DECLARE statement must have matching BEGIN and END statements.  (The BEGIN and END statements above are for procedure thisway1, which is nested inside the DECLARE section.)  I suspect you only copied part of the code from the book.
    The CREATE TABLE statement also has an error; it has 2 left '('s, but only 1 right ')'.  You need to have an equal number of each..
    Thank you so much for replying! Ok, the create table was a typo since im on my phone., but Serioulsy this is the way this procedure code looks like in the book.
    I will do what you said, hopefully i can get it to execute so i can continue on in my studies. Thanks for being nice.

  • Performance issue with pl/sql code

    Hi Oracle Gurus,
    I am in need of your recommendations for a performance issue that I am facing in production envrionment. There is a pl/sql procedure which executes with different elapsed time at different executions. Elapsed Times are 30minutes , 40 minutes, 65 minutes , 3 minutes ,3 seconds.
    Expected elapsed time is maximum of 3 minutes. ( But some times it took 3 seconds too...! )
    Output on all different executions are same that is deletion and insertion of 12K records into a table.
    Here is the auto trace details of two different scenarios.
    Slow execution - 33.65 minutes
    Stat Name                                Statement   Per Execution % Snap
    Elapsed Time (ms)                         1,712,343    1,712,342.6    41.4
    CPU Time (ms)                             1,679,689    1,679,688.6    44.7
    Executions                                        1            N/A     N/A
    Buffer Gets                              ##########  167,257,973.0    86.9
    Disk Reads                                    1,284        1,284.0     0.4
    Parse Calls                                       1            1.0     0.0
    User I/O Wait Time (ms)                       4,264            N/A     N/A
    Cluster Wait Time (ms)                        3,468            N/A     N/A
    Application Wait Time (ms)                        0            N/A     N/A
    Concurrency Wait Time (ms)                        6            N/A     N/A
    Invalidations                                     0            N/A     N/A
    Version Count                                     4            N/A     N/A
    Sharable Mem(KB)                                 85            N/A     N/A
              -------------------------------------------------------------Fast Exection : 5 seconds
    Stat Name                                Statement   Per Execution % Snap
    Elapsed Time (ms)                            41,550       41,550.3     0.7
    CPU Time (ms)                                40,776       40,776.3     1.0
    Executions                                        1            N/A     N/A
    Buffer Gets                               2,995,677    2,995,677.0     4.2
    Disk Reads                                       22           22.0     0.0
    Parse Calls                                       1            1.0     0.0
    User I/O Wait Time (ms)                         162            N/A     N/A
    Cluster Wait Time (ms)                          621            N/A     N/A
    Application Wait Time (ms)                        0            N/A     N/A
    Concurrency Wait Time (ms)                       55            N/A     N/A
    Invalidations                                     0            N/A     N/A
    Version Count                                     4            N/A     N/A
    Sharable Mem(KB)                                 85            N/A     N/A
              -------------------------------------------------------------For security reasons, I cannot share the actual code. Its a report generating code that deletes and load the data into table using insert into select statement.
    Delete from table ;
    cursor X to get the master data ( 98 records )
    For each X loop
    insert into tableA select * from tables where a= X.a and b= X.b and c=X.c ..... ;
    -- 12 K records inserted on average
    insert into tableB select * from tables where a= X.a and b= X.b and c=X.c ..... ;
    -- 12 K records inserted on average
    end loop ;1. The select query is complex with bind variables ( explain plan varies for each values )
    2. I have checked the tablespace of the tables involved, it is 82% used. DBA confirmed that it is not the reason.
    3. Disk reads are high during long execution.
    4. At long running times, I can see a db sequential read wait event on a index object. This index is on the table where data is inserted.
    All I need to find is why this code is taking 3 seconds and 60 minutes on the same day and on the consecutive executions ?
    Is there any other approach to find the root cause of this behaviour and to fix it ? Kindly adivse.
    Thanks in advance your help.
    Regards,
    Hari
    Edited by: BluShadow on 26-Sep-2012 08:24
    edited to add {noformat}{noformat} tags.  You've been a member long enough to know to do this yourself... so please do so in future.  ({message:id=9360002})                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hariharan ST wrote:
    Hi Oracle Gurus,
    I am in need of your recommendations for a performance issue that I am facing in production envrionment. There is a pl/sql procedure which executes with different elapsed time at different executions. Please reedit your post and add some code tags around the trace information. This would improve readability greatly and will help us to help you
    example
    {<b></b>code}
    select * from dual;{<b></b>code}
    Based upon your description I can imagine two things.
    a) The execution plan for the select query does change frequently.
    A typical reason can be not up to date statistics.
    b) Some locking / wait conflict. For example upon a UK index.
    Are there any other operations going on while it is slow? If anybody inserts a value, then your session will wait, if the same (PK/UK) value also is to be inserted.
    Those wait events can be recognized using standard tools like oracle sql developer or enterprise manager while the query is slow.
    Also go through the links that are in the FAQ. They tell you how to get better information for makeing a tuning request.
    SQL and PL/SQL FAQ
    Edited by: Sven W. on Sep 25, 2012 6:41 PM

  • Controling Column Order for Report with Dynamic SQL

    Hi,
    I have a report region using Function block returning the SQL.
    The output of the function will look like the following
    SELECT NAME, CLASS1, CLASS2,CLASS3,CLASS4, AVERAGE_SCORE FROM XXXX;
    The number of CLASSn column will be determine by the function based on the data. If the person doesn't have any score on CLASS4, the the SQL would not have CLASS4 column.
    My problem with this is I can't control the order of column appearance.
    For e.g : If my previous SQL is without CLASS4, when I query a person with CLASS4. The CLASS4 column will appear after the AVERAGE_SCORE.
    NAME---CLASS1---CLASS2---CLASS3---AVERAGE_SCORE---CLASS4
    I want it to maintain AVERAGE_SCORE as the last column.
    Can you guys give a suggestion how to handle this?
    Additional info :
    - I am disabling the report header, setting it to None as the first row of the sql returned records is the header.
    Cheers,
    Joel

    Hi all,
    My report seems to be behaving correctly once i set it to "Use Generic Column Names (parse query at runtime only)" :)
    Cheers,
    Joel

  • Help with PL/SQL code

    Hi!
    I need help, I don't know why I recieve errors with my code:
    declare
    xMin number(3) NOT NULL := 50;
    xMax number(3) NOT NULL := 70;
    yMin number(3) := 0;
    yMax number(3) := 20;
    begin
    IF xMin < -400 THEN
    xMin = -400;
    ELSIF xMax > 400 THEN
    xMax = 400;
    ELSEIF yMin < -400 THEN
    yMin = -400;
    ELSEIF yMax > 400 THEN
    yMax = 400;
    END IF;
    select sum(population) populacija
    from naselje
    where x BETWEEN xMin AND xMax
    and y BETWEEN yMin AND yMax;
    end;
    error I get is:
    ORA-06550: line 10, column 15:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
    := . ( @ % ;
    The symbol ":= was inserted before "=" to continue.
    ORA-06550: line 12, column 15:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
    := . ( @ % ;
    1. declare
    2. xMin number(3) NOT NULL := 50;
    3. xMax number(3) NOT NULL := 70;Thanks for your help!
    Regards,
    Dragan

    Although you got your answer, next time post in the sql/ pl/sql forum.
    PL/SQL

  • Oracle Reports with PL/SQL package in before Trigger

    I have an oracle report which is set to run as a concurrent program in Oracle Apps. My before report trigger calls a pl/sql package. I am debating using errbuf and retcode, since I have not defined the pl/sql package as a concurrent program. But if I do add errbuf and retcode to the pl/sql package parameters, how do I call them in the trigger.
    function BeforeReport return boolean is
    begin
    delete from XXDK_SAMS2_MEAN_RATIO;
    delete from XXDK_SALES_RATIO_TOTALS;
    commit;
    XXDK_SAMS2_SALES_RATIO_RPT_PKG.INSERT_SALES*(:errbuf, :retcode*, :neighborhood, :salefrom, :saleto, :verfrom, :verto, :tax,
    :deed1, :deed2, :deed3, :tran1, :tran2, :tran3, :accnttype);
    return (TRUE);
    end;
    And do I add errbuf and ret code as paramters in the registered setup?

    Hi,
    please see if the code in these documents help.
    Note: 73492.1 - Creating a PL/SQL Concurrent Program in Oracle Applications
    Note: 221542.1 - Sample Code for FND_SUBMIT and FND_REQUEST API's
    Regards,
    Hussein

  • Report with pl-sql function body returning sql query

    Hi
    using apex 4.0
    I have a requirement to create a report like cross tab and i have followed link "http://forums.oracle.com/forums/thread.jspa?threadID=697760".
    written below code in region source.
    declare
    q varchar2(4000);
    begin
    q := pk_pivot.pivotsql('select * from emp','deptno','empno,ename');
    return q;
    end;
    when running report it gives "web page can not found -HTTP 404 NOT FOUND" .
    Please help to sove this error.
    Thanks in advance

    Hi,
    I get the same error.. If you have a solution, could you share it ??
    Thanks,
    Poru

Maybe you are looking for

  • Find the number of concurrent users in system at a given time

    Hi All, We have the ECC system in which we need to set up monitoring alert which should tell the following things. 1.The  number of concurrent users looged  currently in the system. 2. List of  transaction per hour or user activites with the counts I

  • Problem with RMAN.

    Hi, i worked with Oracle Database 10g Express Edition, my problem is the execute the Backup utility, display the message error: RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FO

  • Spool command  in form builder

    hello; we try this command in sql plus(ok) spool c:\sample.dat select * from employee; spool off my problem is this possible to include spool command in program units using form builder. PROCEDURE mis$atm_dat_creation IS BEGIN SPOOL C:\ETPS\PAYROLL.D

  • Getting a PDF by triggering an Output Type

    Hi All, I have created an Output Type in NACE. Say ZRUD. In Nace I have configured it to a PrintProgram. Then please tell me the next procedures, through which I will be able to generate a PDF not by directly executing the smartform, but by triggerri

  • Where can I find more synth "instruments" for GB??

    I'm writing songs in GB for my band to play, and the keyboard player is using a 80s synthesizer. I'm looking to buy or (free download??) instruments that would better approximate actual synthesizer sounds. I'm very unhappy with the selection in GB. L