ORA-01858 error from Apex Report on working/valid underlying query

After two days of searching these forums and AskTom, I think I need to post the following problem.
I have what seems to be a valid view of some data created as follows (with an apology for the formatting - doesn't seem to be a way of using a fixed font here):
CREATE OR REPLACE FORCE VIEW "PRICING_CAPABILITY"."POW_EXEC_SUMM010" ("Item",
"Jul-09", "Aug-09", "Sep-09", "Oct-09", "Nov-09", "Dec-09", "Jan-10",
"Feb-10", "Mar-10", "Apr-10", "May-10", "Jun-10", "YTD")
AS
SELECT
"Item",
SUM(DECODE("ItemMonth",'Jul-09',"ItemValue",0)) "Jul-09",
SUM(DECODE("ItemMonth",'Aug-09',"ItemValue",0)) "Aug-09",
SUM(DECODE("ItemMonth",'Sep-09',"ItemValue",0)) "Sep-09",
SUM(DECODE("ItemMonth",'Oct-09',"ItemValue",0)) "Oct-09",
SUM(DECODE("ItemMonth",'Nov-09',"ItemValue",0)) "Nov-09",
SUM(DECODE("ItemMonth",'Dec-09',"ItemValue",0)) "Dec-09",
SUM(DECODE("ItemMonth",'Jan-10',"ItemValue",0)) "Jan-10",
SUM(DECODE("ItemMonth",'Feb-10',"ItemValue",0)) "Feb-10",
SUM(DECODE("ItemMonth",'Mar-10',"ItemValue",0)) "Mar-10",
SUM(DECODE("ItemMonth",'Apr-10',"ItemValue",0)) "Apr-10",
SUM(DECODE("ItemMonth",'May-10',"ItemValue",0)) "May-10",
SUM(DECODE("ItemMonth",'Jun-10',"ItemValue",0)) "Jun-10",
SUM("ItemValue") AS "YTD"
FROM
SELECT
'New Proposals Received' AS "Item",
TO_CHAR(t1.scope_received,'Mon-RR') AS "ItemMonth",
COUNT(*) AS "ItemValue",
10 AS "SortOrder"
FROM
PRICING_CAPABILITY.POW_DATA t1
WHERE
t1.scope_received IS NOT NULL
AND extract(YEAR FROM t1.scope_received) IN (2009,2010)
AND t1.scope_received >= '01-JUL-2009'
GROUP BY
'New Proposals Received',
TO_CHAR(t1.scope_received,'Mon-RR'),
10
UNION
SELECT
'New Proposals Completed' AS "Item",
TO_CHAR(t2.pricing_approval,'Mon-RR') AS "ItemMonth",
COUNT(*) AS "ItemValue",
20 AS "SortOrder"
FROM
PRICING_CAPABILITY.POW_DATA t1
JOIN PRICING_CAPABILITY.POW_LAST_HISTORY t2
ON
t1.POW_DATA_ID = t2.POW_DATA_ID
WHERE
t2.pricing_approval IS NOT NULL
AND extract(YEAR FROM t2.pricing_approval) IN (2009,2010)
AND t2.pricing_approval >= '01-JUL-2009'
GROUP BY
'New Proposals Completed',
TO_CHAR(t2.pricing_approval,'Mon-RR')
GROUP BY
"Item",
"SortOrder"
ORDER BY
"SortOrder" ;
This view works, ie produces the right results when run (ie select * from ...) in SQL Developer and in the SQL Workshop section of Apex.
But when I attempt to produce an Apex report using it as the source of data, I get the following error:
ORA-01858: a non-numeric character was found where a numeric was expected
The error is displayed before any part of the report itself is displayed, ie the Region Header is displayed and then the error message.
So far, anything I've been able to find on the forums or AskTom suggests that it is probably due to a date conversion problem. But the aim here is to summarise dated records by month, so I'm extracted the year and month elements of the date values, converting them to strings (using TO_CHAR), and then using the resulting 'Mon-YY' strings to group the results.
If there is a better way, I'm interested.
But I don't understand why Apex seems to be rejecting what appear to be valid results from a valid working query.
Any ideas? Suggestions?
Cheers,
Peter

Thanks again, Flavio. I'm learning and I appreciate your patience.
The solution you provided is very similar to the one I came up with after your previous message, but I didn't have the NLS_DATE_LANGUAGE parameter. I'll go back and try it.
I appreciate your explanation re Apex not needing to know and Oracle assuming that the client knows what it is doing, but it puzzles me more.
The way that I originally had things, I think, was consistent with what you have explained, but it didn't work. To make it clear:
1 I had an Oracle view that had no parameters and contained the date literal in the where clause and worked fine in both SQL Developer and in the Apex SQL Workshop.
2 The view did not return any date values. Aside from the column headings and the first column (of character strings), the body of the table comprised integer values only.
3 So, when Apex called the view, I would have expected the Oracle server to independently execute the view and return the (dateless) results to Apex, which would then present the unmodified results in a standard report. This is, I think, what SQL Developer and the Apex SQL Workshop appear to have successfully done.
My expectation seems to be consistent with at least some of your explanation (ie [Oracle assumes] "+that the client knows what it is doing+" and "+apex doesn't need to know anything about the underlying query+"), but is not consistent with actual experience, where Apex seems to know that the underlying query contains a date literal and unsuccessfully (and unnecessarily) attempts to interpret it.
I'm obviously missing something about how Apex and Oracle interact in this situation. While I don't need to know - as I have a working solution now - it is valuable to understand how things work. Makes life easier and more productive.
Cheers,
Peter

Similar Messages

  • How to get actual error from Crystal Report

    We are using Crystal report in web service.
    We faced some problem due to crystal report unexpected error.
    Refer the below error message.
    Xception E NSF NSFZ1100 20100608 145511565 GPRAB0 : GPRZ10 GUEC0001 [1] AbstractService Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
    Xception E NSF NSFZ1100 20100608 145511972 GPRAB0 : GPRZ10 GUEC0001 [1] AbstractService at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
    at System.Windows.Forms.MessageBox.Show(String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon)
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.HandleExceptionEvent(Object eventSource, Exception e, Boolean suppressMessage)
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.HandleExceptionEvent(Object eventSource, Exception e)
    at CrystalDecisions.Windows.Forms.ReportDocumentBase.GetLastPageNumber()
    at CrystalDecisions.Windows.Forms.ReportDocumentBase.GetLastPage()
    at CrystalDecisions.Windows.Forms.DocumentControl.ShowLastPage()
    at CrystalDecisions.Windows.Forms.PageView.ShowLastPage()
    at Biz.Nissan.Cats.CORE.REPORT.LibCrystalReport.TotalPageCount(ReportDocument Rpt)
    at Biz.Nissan.Cats.CORE.REPORT.LibCrystalReport.Print(BaseReport RptDefinition)
    at Biz.Nissan.Cats.CORE.REPORT.MCTLIST260Print.Print(IFData ifData)
    at Biz.Nissan.W3.CATS.BC.Service.DistributeService.ExecuteMpp()
    How we get the actual error from crystal report?
    Thanks in Advance

    Same as
    crystal report unexpected error in Web service (IIS)
    Closing this thread.
    Ludek

  • Excluding ORA-00060 errors from Generic Alert Log Error in OEM

    Hi,
    I want to remove the alerts for ORA-00060 errors from OEM Alerts. In "Generic Alert Log Error" the current expression for Warning is ORA-0*(600?|7445|4[0-9][0-9][0-9])[^0-9]. How should I change this expression so that it will not send alerts for ORA-00060. I am not much aware of perl :-). Please help me with the expression.
    Target Type=dbname
    Host=host
    Metric=Generic Alert Log Error
    Metric Value=ORA-00060: Deadlock detected. More info in
    Time/Line Number=Mon Nov 2 10:02:54 2009/134883
    Timestamp=Nov 2, 2009 10:17:14 AM EST
    Severity=Warning
    Message=ORA-error stack (00060) logged in /eb_rdo0_p/oraadmin/pnoltp/bdump/alert_.log.
    Notification Rule Name=Database Alert
    Notification Rule Owner=SYSMAN
    Notification Count=1
    Thanks,
    Varma

    this is default monitored objects.
    To stop monitoring for this object, clear the Critical and Warning threshold values and click Continue.

  • Anyone seen this?!?  ORA-32103: error from OCI call

    Greetings all,
    Getting this error (ORA-32103: error from OCI call) when calling Environment::getCacheMaxSize() after calling Environment::createEnvironment(). The error is not listed in the Oracle documentation and I was wondering if anyone had seen it or knew what it meant.
    snippet
    Environment* env = Environment::createEnvironment(Environment::THREADED_MUTEXED);
    std::cout << "ok..\n";
    std::cout << "The env pointer:" << env << std::endl;
    std::cout << "ok..\n";
    std::cout << "Here is a Env variable:" << env->getCacheMaxSize() << std::endl;
    end snippet
    Many thanks,
    John Fauntleroy

    Thanks for the response!
    I've not been able to get to the connection stage of the process as the error occurs just after the createEnvironment() call.I believe the Evironment is not being created correctly for some reason but have no idea why because no exceptions are being thrown and the my testing only yields an unlisted error. ack, frustrating tstl! The error I'm getting is "ORA-32103: error from OCI call". ORA-32103 is not listed in the oracle error docs. ORA-32101 and ORA-32105 are listed but nothing in between. Is interesting...
    Anyone got some ideas?
    Best regards,
    John Fauntleroy

  • ORA-01858 error in Application but not in sqlpluss

    Hi.
    I have this query that runs nicely in sqlpluss and the SQL Commands that came with Expressedition 10g, but when I put it in a report region it produce:
    report error:
    ORA-01858: a non-numeric character was found where a numeric was expected
    query:
    SELECT temae.temae, NVL(antall,0) Antall
    FROM temae LEFT OUTER JOIN (SELECT temae, count(temae) as antall
    FROM okeiko
    WHERE person = :P3_PERSON and dag >= to_date(DECODE(SIGN(to_char(current_date,'mm')-5),
    -1, to_date('01-NOV-'||to_char(current_date,'yy'))-365,
    0, to_date('01-MAY-'||to_char(current_date,'yy')),
    1, DECODE(SIGN(to_char(current_date,'mm')-10),
    -1,to_date('01-MAY-'||to_char(current_date,'yy')),
    0,to_date('01-MAY-'||to_char(current_date,'yy')),
    1,to_date('01-NOV-'||to_char(current_date,'yy')))),'dd-mon-yy')
    GROUP BY temae) p
    ON temae.id = p.temae
    where antall > 0
    ORDER BY NVL(antall,0) DESC, temae.type, temae.temae
    Before I added the decode part for the date it looked like this, and worked nice in the application:
    SELECT temae.temae, NVL(antall,0) Antall
    FROM temae LEFT OUTER JOIN (SELECT temae, count(temae) as antall
    FROM okeiko
    WHERE person = :P3_PERSON and dag > to_date('30-apr-06','dd-mon-yy')
    GROUP BY temae) p
    ON temae.id = p.temae
    where antall > 0
    ORDER BY NVL(antall,0) DESC, temae.type, temae.temae
    This is the data structure
    SQL> describe temae
    Name Null? Type
    ID NOT NULL NUMBER
    TEMAE VARCHAR2(20)
    TYPE NUMBER
    Then it worked nicely in the application to.
    SQL> describe okeiko;
    Name Null? Type
    ID NOT NULL NUMBER
    PERSON NOT NULL NUMBER
    TEMAE NOT NULL NUMBER
    SENSEI NUMBER
    REMARK VARCHAR2(4000)
    DAG NOT NULL DATE
    Can anyone se why application is complaining?
    BTW report region also complains to_date('01-may-06','dd-mon-yy') does not have a valid month.

    Marius,
    I am not sure but try this:
    SELECT   temae.temae, NVL (antall, 0) antall
        FROM temae LEFT OUTER JOIN (SELECT   temae, COUNT (temae) AS antall
                                        FROM okeiko
                                       WHERE person = :p3_person
                                         AND dag >=
                                                TO_DATE
                                                   (DECODE
                                                       (SIGN
                                                           (  TO_CHAR
                                                                    (CURRENT_DATE,
                                                                     'mm'
                                                            - 5
                                                        -1, TO_DATE
                                                              (   '01-NOV-'
                                                               || TO_CHAR
                                                                     (CURRENT_DATE,
                                                                      'yy'
                                                         - 365,
                                                        0, TO_DATE
                                                           (   '01-MAY-'
                                                            || TO_CHAR
                                                                    (CURRENT_DATE,
                                                                     'yy'
                                                        1, DECODE
                                                           (SIGN
                                                               (  TO_CHAR
                                                                     (CURRENT_DATE,
                                                                      'mm'
                                                                - 10
                                                            -1, TO_DATE
                                                               (   '01-MAY-'
                                                                || TO_CHAR
                                                                      (CURRENT_DATE,
                                                                       'yy'
                                                            0, TO_DATE
                                                               (   '01-MAY-'
                                                                || TO_CHAR
                                                                      (CURRENT_DATE,
                                                                       'yy'
                                                            1, TO_DATE
                                                               (   '01-NOV-'
                                                                || TO_CHAR
                                                                      (CURRENT_DATE,
                                                                       'yy'
                                    GROUP BY temae) p ON temae.ID = p.temae
       WHERE antall > 0
    ORDER BY NVL (antall, 0) DESC, temae.TYPE, temae.temaeI took out the formating of your to_date function.
    Denes Kubicek

  • ORA-01858 error in RMAN during backup backupset format '/test/rman/%U'

    Hello!
    I am trying to perform bacup using command
    RMAN> backup backupset completed after 'sysdate-1' format '/tmp/test/%U';
    as described in:
    asmcmd scripts
    All backupsets are copied to /tmp/test/.
    Everything is going fine except the last message from RMAN:
    input backupset count=5342 stamp=660348635 creation_time=17-JUL-08
    channel ORA_DISK_1: starting piece 1 at 18-JUL-08
    piece handle=/tmp/test/6ujlo7mr_1_2 comment=NONE
    channel ORA_DISK_1: finished piece 1 at 18-JUL-08
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
    input backupset count=5343 stamp=660348722 creation_time=17-JUL-08
    channel ORA_DISK_1: starting piece 1 at 18-JUL-08
    piece handle=/tmp/test/6vjlo7pi_1_2 comment=NONE
    channel ORA_DISK_1: finished piece 1 at 18-JUL-08
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
    input backupset count=5344 stamp=660348810 creation_time=17-JUL-08
    channel ORA_DISK_1: starting piece 1 at 18-JUL-08
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/18/2008 10:59:48
    ORA-01858: a non-numeric character was found where a numeric was expected
    I suspect that rman is performing, at the end of backup, some internal work (store something in control file based catalog or so) and catches ORA-01858.
    The destination catalog is local catalog (not nfs mounted remote dir).
    RMAN is spawned from the same node the Oracle Database is running on.
    I tested it on two servers.
    Error occurs on both of them:
    version 10g (ia-32) - flash recovery area on filesystem
    and version 11g (Aix) - flash on ASM
    RMAN-oracle10> show all ;
    using target database controlfile instead of recovery catalog
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    CONFIGURE BACKUP OPTIMIZATION OFF;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/10gSE/dbs/snap_dbname.dbf'; # default
    RMAN-oracle11> show all ;
    using target database control file instead of recovery catalog
    RMAN configuration parameters for database with db_unique_name O2DB are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.1.0/dbname_1/dbs/snapcf_dbname.f';
    How to diagnose the problem?
    How check what RMAN is exactly doing when error occurs?
    Or maybe there is better way to achieve this:
    I want to move backupset from asm realm to remote server without storing them on local, non asm disk.
    Any suggestions kindly welcome!
    Thanx!

    Solution:
    NLS_DATE_FORMAT mus be set mannualy;
    export NLS_DATE_FORMAT='YYYY_MM_DD'
    solved the problem..
    https://metalink.oracle.com/metalink/plsql/f?p=130:15:12788270042070262572::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,6198368,1,1,1,helvetica
    Metalinking before posting is the rule of thumb : )

  • Lession 3 oca sql fundamental doubts on ora -01858 error

    SELECT last_name, hire_date
       FROM   employees
       WHERE  hire_date = TO_DATE('May 24, 1999', 'fxMonth DD, YYYY');
       books mention it will leave a error (ora-01858 which is an non-numeric error )but the statement running perfectly while
    by deleting that "fx"-prefix gives an error called ora-01861.
    i am confused here??can anyone show me the right way?

    Hi,
    The outcome depends on your NLS settings. Probably yours are set to something different than AMERICAN. In you language the month of May may then have a different number of characters(?)
    That's why you hit the ORA-01861 with the FX Format Model, and something else without. (Can't see why you should get ORA-01858, though)
    Regards
    Peter

  • Handling ORA-01858 error

    hi every body,
    How can i handle exception ora-01858 without
    using when others then null;
    I want something
    like
    when user_definded =ora-01858 then null;
    when others then
    v_ErrorNumber := SQLCODE;
    v_ErrorText := SUBSTR(SQLERRM, 1, 2000);

    in fact ,
    I use a procadure that insert values into a table.
    I want that when it reaches an ORA-01858 , then the error is ignored and continue
    to insert others values,
    but now , when I reach error it stops, how to deal with it ?
    CREATE OR REPLACE PROCEDURE INSERT_SWAP_FIXINGS (l_num number)
    as
    v_date varchar2(20);
    v_swap varchar2(1000);
    conn utl_tcp.connection;
    p pls_integer;
    line varchar2(4000);
    v_ErrorNumber NUMBER; -- Variable to hold the error number
    v_ErrorText VARCHAR2(200); -- Variable to hold the error message text
    e_Non_Numeric EXCEPTION;
    PRAGMA EXCEPTION_INIT(e_Non_Numeric , -1858);
    begin
    select trunc(sysdate) -l_num into v_date from dual;
    select regexp_replace (stringAgg(ticker),',','|') ||';' into v_swap from SWAP_DESC ;
    conn := utl_tcp.open_connection(remote_host=>'MY_H0ST',remote_port=>123156);
    p := utl_tcp.write_line(conn, v_swap);
    p := utl_tcp.write_line(conn, 'PX_Last;');
    p := utl_tcp.write_line(conn, v_date );
    p := utl_tcp.write_line(conn,';');
    p := utl_tcp.write_line(conn, v_date);
    p := utl_tcp.write_line(conn, '>');
    begin
    loop
    line := utl_tcp.get_line(conn, TRUE);
    if get_token(line,2) like '%N/A%' then
    dbms_output.put_line(get_token(line,1)||','||get_token(line,2));
    dbms_output.put_line(line);
    insert into TMP_SWAP_FIXINGS
    values (get_token(line,1),to_date(get_token(line,2),'DD/MM/YYYY'));
    else
    insert into swap_fixings values (get_token(line,1),to_date(get_token(line,2),'DD/MM/YYYY'),get_token(line,3));
    end if;
    end loop;
    EXCEPTION
    WHEN utl_tcp.end_of_input THEN
    NULL;
    end;
    utl_tcp.close_connection(conn);
    commit;
    declare
    ligne varchar2(2000);
    corps varchar2(7000);
    begin
    ligne :=' DATA SWAP INSERTION : '
    || UTL_TCP.crlf || UTL_TCP.crlf
    || RPAD ('TICKER',30,' ')
    || RPAD ('INFO_DATE',40,' ')
    || RPAD ('LAST_PRICE',10,' ');
    corps := ligne || UTL_TCP.crlf;
    for x in (select ticker,to_char(info_date,'DD/MM/YYYY') "INFO_DATE",LAST_PRICE from SWAP_FIXINGS where trunc(info_date) = v_date)
    loop
    ligne :=
    RPAD (x.TICKER, 30, ' ')
    ||RPAD (x.info_date,40 ,' ')
    ||RPAD (x.LAST_PRICE,10,' ');
    corps := corps || ligne || UTL_TCP.crlf;
    end loop;
    corps := '<pre>' || corps || '</pre>';
    debug(corps);
    end;
    EXCEPTION
    WHEN e_Non_Numeric then
    null;
    when OTHERS THEN
    v_ErrorNumber := SQLCODE;
    v_ErrorText := SUBSTR(SQLERRM, 1, 200);
    declare
    ligne varchar2(2000);
    corps varchar2(7000);
    begin
    ligne := RPAD (v_ErrorText, 200, ' ');
    corps := corps || ligne || UTL_TCP.crlf;
    corps := '<pre>' || corps || '</pre>';
    debug(corps);
    end;
    end;
    /

  • Call Javascript function to pass a id  from APEX report column link

    Hi,
    Can anyone help me, in a report column link i'm calling a function to pass an id and i want to onclick change a icon on that column based on the value on the column status of this table.
    Is this possible?

    Hi Ron,
    I am doing exaclty what you have suggested me but no luck. I started changing the DEMO_CUSTOMERS application to my requirements.The report is working fine and on the report I have created a page attribute to the Hyper linked column and linked that to the page 2 and assign that attribute with #JOBNUM#.
    I am able to pass that value on to form when I click on the JOBNUM. But the problem is I am not able to pass that value into the SQL query so that my query pulls 20+ columns on to the Form ( which is second page ).
    Small clarification... On the form region it is said FORM NAME and type is HTML is that is the way the APEX was designed or does it need to say region type as FORM.
    Thanks for your help in advance.
    Cheers,
    Krishna.

  • Query run in Sql prompt correctly but give error in APEX report ORA-01843

    Hi. all APEX user
    Last week I upgrade APEX 3.2 to 4.0.2 . Now i have a problem. PL/SQL reports which are working in APEX 3.2 not working in 4.0.2. Help me.....
    I am working on a mission critical application we have to upgrade there next month.
    Query code is :-
    select * from (
    Select pp.PAYMENT_DATE,pp.PATIENT_ID,p.name as name,pa.Service_Subtype,pp.PAYMENT_RECEIPT_ID,pa.Ward_Type,(pp.TOTAL_CHARGE-pp.discount) as amount ,pa.Service_Booked_By,pp.PAYMENT_COLLECTOR,
    case when pp.discount=0 then 1
    when pp.TOTAL_CHARGE = pp.discount then 3
    else 2
    end payment_status
    from patients p,PATIENT_Payment pp,PATIENT_account pa where p.patient_id = pp.patient_id and pp.patient_id=pa.patient_id and pa.SERVICE_SUBTYPE=pp.SERVICE_SUBTYPE AND pp.SERVICE_REGISTRATION_ID=pa.SERVICE_REGISTRATION_ID and
    (pp.PAYMENT_DATE>=to_date(:P15_date_from,'dd-mon-rr')) AND
    (pp.PAYMENT_DATE<=to_date(:P15_date_to,'dd-mon-rr'))AND
    (pa.GROUP_NAME=:p15_Group or :p15_Group='ALL') AND
    (pp.service_type=:p15_Service_Type or :p15_Service_Type='ALL') AND
    (pp.SERVICE_SUBTYPE=:p15_SERVICE_SUBTYPE or :p15_SERVICE_SUBTYPE='ALL') AND
    (pa.WARD_TYPE=:p15_Ward or :p15_Ward='ALL') AND
    (pp.PAYMENT_COLLECTOR=:p15_Collector or :p15_Collector='ALL')
    )order by pp.PAYMENT_DATE
    ) where payment_status=:p15_status
    order by 1

    In your query, you expect the date to have the format 'dd-mon-rr'. Have you checked if the format of the date-items is of this format?

  • Error in apex report Ora-20001 The printng engine could not be reached

    I created a report query. When I test it I got the following error.
    Ora-20001 Report engine colud not find the requested url.

    hi All,
    i want to have Print Option Enabled on my Reports
    i did as mentioned in the Document
    Configuring Report Printing in a Full Development Environment
    To configure the printing of reports in a full development environment:
    1. Log in to Oracle Application Express Administration Services. See "Logging in to
    Oracle Application Express Administration Services" on page 2-3.
    2. Click Manage Service.
    3. Under Manage Environment Settings, click Instance Settings.
    4. Scroll down to Report Printing:
    5. For Oracle BI Publisher, select one of the following:
    – Standard Support - This is the default setting. Standard Support enables you
    to print report regions and report queries using either the built-in templates
    provided with Oracle Application Express or other XSL-FO compatible
    formats you provide. This setting does not support RTF (rich text format).
    Standard Support provides declarative formatting of report regions and report
    queries with basic control over page attributes, including orientation, size,
    column heading formats, page header, and page footer.
    – Advanced Support - Requires a valid license of Oracle BI Publisher (also
    known as Oracle XML Publisher). Advanced Support provides you with all
    the capabilities of the Standard setting plus the ability to define RTF-based
    report layouts developed using the BI Publisher Word Template Builder.
    To learn more about installing and configuring Oracle BI Publisher, see PDF
    Printing in Application Express 3.1. See:
    6. For Print Server Protocol, select the protocol that the print server uses.
    7. For Print Server Host Address, specify the host address of the print server engine.
    8. For Print Server Port, define the port of the print server engine. By default, this is
    set to 8888 when the report server is installed.
    9. For Print Server Script, define the script that is the print server engine. The default
    setting is:
    /xmlpserver/convert
    10. Click Apply Change
    After Configuring the Print Option,
    i am having Oracle 10g Releae2 on Hp- Unix, and Apex 3.1
    i didnt Install Oracle BI publisher
    i want to Enable Print Option on my Reports
    when i try to give the Print a Report
    i am getting the Below Error
    <div id="report_7026503216111526_catch"></div><pre>report error:
    ORA-20001: The printing engine could not be reached because either the URL specified is incorrect or a proxy URL needs to be specified.</pre>
    please Help me out
    Many thanks

  • ORA-00936 error from SQL expression in SQL*Loader script

    I am getting the above error on the following line in my SQL*Loader script:
    DIA_CLM_RES_OID DECIMAL EXTERNAL
    "SELECT N_ORG_ENTY_ID FROM TESTG4.ORG_ENTITY
    WHERE N_USER_ID =
    (SELECT UNIQUE WSR_NT_ID FROM CONV_CLM_RESOURCE
    WHERE CLM_RES_OID = :DIA_CLM_RES_OID)",
    What I am basically trying to do is a 2-table lookup of a value:
    1. Find a row in table CONV_CLM_RESOURCE where the value in column CLM_RES_OID matches the value in the input file in field DIA_CLM_RES_OID.
    2. Take the value of field WSR_NT_ID from that row and use it to find a row in table TESTG4.ORG_ENTITY.
    3. Take the value of field WSR_NT_ID from that row and set it in the target table in field DIA_CLM_RES_OID.
    In other words, I am essentially trying to translate the input value by using two other tables to lookup the value to translate to. However, no matter how I arrange it, I keep getting the "ORA-00936: missing expression" error on this statement.
    Can anyone see what I am doing wrong, or perhaps suggest a better way of accomplishing a two-table translation of a value?
    Thanks!

    Still not sure why this doesn't work, but I was able to create and use a function to do this instead, which is probably a better approach anyway.

  • Ora-00600 error from dev6i on linux database

    hi all,
    i am encountering ora-00600 while compiling forms 6i on linux db 10g. It is also not picking any query from dual in dev6i. while everything is working fine on toad and sqlplus. The client machine is xp. Whats wrong with it and how it can be solved ?

    server: redhat enterprise linux AS / db 10g
    client: windows xp / developer6i
    yes sqlplus is quering the dual properly, for example sysdate. But i can't get the sysdate from in forms6i installed under xp. Even the procedure builder in 6i is not returning the sysdate from dual. the error message is
    ora-00600: internal error code, arguments [17069], [36376872].......
    the .fmx executables are running properly and returning the sysdate, but everytime i open the form module for modification, three program units throw the exception ora- 00600 and all have multliple queries for dual.
    i even restarted the database on linux and form builder 6i on xp, now i am thinking of restarting both OS.
    Forms 9iDS is not encountering this problem, whats wrong with 6i ?
    Message was edited by:
    zaibiman

  • ORA-12899 error from function invoked from SQL*Loader

    I am getting the above error when I call a function from my SQL*Loader script, and I am not seeing what the problem is. As far as I can see, there should be no problem with the field lengths, unless the length of the automatic variable within my function is somehow being set at 30? Here are the details (in the SQL*Loader script, the field of interest is the last one):
    ====
    Error:
    ====
    Record 1: Rejected - Error on table TESTM8.LET_DRIVE_IN_FCLTY, column DIF_CSA_ID.
    ORA-12899: value too large for column "TESTM8"."LET_DRIVE_IN_FCLTY"."DIF_CSA_ID" (actual: 30, maximum: 16)
    =======
    Function:
    =======
    CREATE OR REPLACE FUNCTION find_MCO_id (di_oid_in DECIMAL)
    RETURN CHAR IS mco_id CHAR;
    BEGIN
    SELECT AOL_MCO_LOC_CD INTO mco_id
    FROM CONV_DI_FLCTY
    WHERE DIF_INST_ELMNT_OID = di_oid_in;
    RETURN TRIM(mco_id);
    END;
    ==============
    SQL*Loader Script:
    ==============
    LOAD DATA
    INFILE 'LET_DRIVE_IN_FCLTY.TXT'
    BADFILE 'LOGS\LET_DRIVE_IN_FCLTY_BADDATA.TXT'
    DISCARDFILE 'LOGS\LET_DRIVE_IN_FCLTY_DISCARDDATA.TXT'
    REPLACE
    INTO TABLE TESTM8.LET_DRIVE_IN_FCLTY
    FIELDS TERMINATED BY '~' OPTIONALLY ENCLOSED BY '"'
    DIF_DRIVE_IN_OID DECIMAL EXTERNAL,
    DIF_FCLTY_TYPE_OID DECIMAL EXTERNAL NULLIF DIF_FCLTY_TYPE_OID = 'NULL',
    DIF_INST_ELMNT_OID DECIMAL EXTERNAL,
    DIF_PRI_PERSON_OID DECIMAL EXTERNAL NULLIF DIF_PRI_PERSON_OID = 'NULL',
    DIF_SEC_PERSON_OID DECIMAL EXTERNAL NULLIF DIF_SEC_PERSON_OID = 'NULL',
    DIF_CREATE_TS TIMESTAMP "yyyy-mm-dd-hh24.mi.ss.ff6",
    DIF_LAST_UPDATE_TS TIMESTAMP "yyyy-mm-dd-hh24.mi.ss.ff6",
    DIF_ADP_ID CHAR NULLIF DIF_ADP_ID = 'NULL',
    DIF_CAT_CLAIMS_IND CHAR,
    DIF_CAT_DIF_IND CHAR,
    DIF_DAYLT_SAVE_IND CHAR,
    DIF_OPEN_PT_TM_IND CHAR,
    DIF_CSA_ID CONSTANT "find_MCO_id(:DIF_DRIVE_IN_OID)"
    ============
    Table Definitions:
    ============
    SQL> describe CONV_DI_FLCTY;
    Name Null? Type
    DIF_INST_ELMNT_OID NOT NULL NUMBER(18)
    AOL_MCO_LOC_CD NOT NULL VARCHAR2(3)
    SQL> describe LET_DRIVE_IN_FCLTY;
    Name Null? Type
    DIF_DRIVE_IN_OID NOT NULL NUMBER(18)
    DIF_INST_ELMNT_OID NOT NULL NUMBER(18)
    DIF_FCLTY_TYPE_OID NUMBER(18)
    DIF_ADP_ID VARCHAR2(10)
    DIF_CAT_DIF_IND NOT NULL VARCHAR2(1)
    DIF_CAT_CLAIMS_IND NOT NULL VARCHAR2(1)
    DIF_CSA_ID VARCHAR2(16)
    DIF_DAYLT_SAVE_IND NOT NULL VARCHAR2(1)
    DIF_ORG_ENTY_ID VARCHAR2(16)
    DIF_OPEN_PT_TM_IND NOT NULL VARCHAR2(1)
    DIF_CREATE_TS NOT NULL DATE
    DIF_LAST_UPDATE_TS NOT NULL DATE
    DIF_ITM_FCL_MKT_ID NUMBER(18)
    DIF_PRI_PERSON_OID NUMBER(18)
    DIF_SEC_PERSON_OID NUMBER(18)
    =========================
    Thanks for any help with this one!

    I changed one line of the function to:
    RETURN CHAR IS mco_id VARCHAR2(16);
    But I still get the same error:
    ORA-12899: value too large for column "TESTM8"."LET_DRIVE_IN_FCLTY"."DIF_CSA_ID" (actual: 30, maximum: 16)
    I just am not seeing what is being defined as 30 characters. Any ideas much appreciated!

  • HOW CAN I AN ERROR FROM A REPORT ON A WEB

    I HAVE AN FORM THAT LAUNCH A REPORT BUT WHEN I RUN THE REPORT,THE REPORT END WITH "TERMINATED WITH ERROR", MY QUESTION
    HOW CAN I SEE MORE INFORMATION ABOUT THE REPORT ERROR?
    tHANKS

    Turn on reports server tracing. In the trace file, you will see a lot of information.
    You can also use /reports/rwservlet/showjobs command to see the error message related to the job that was sent from Forms.
    Thanks,
    -Shaun

Maybe you are looking for

  • Scheduling function module execution in background jobs

    Hi, I have requirement where in after obtaining all the required inputs from the user we will call an function module to execute it. The requirement is that the execution of fm shld happen in background and a log must be created showing the user whth

  • Tutorial SyBase Unwired with SAP RFC

    Hello everyone. Does anybody have a tutorial or books how create project with SAP RFC? I need to create a project approval Purchase Order (BAPI_PO_GETITEMSREL and BAPI_PO_RELEASE); Thank's.

  • ITunes Match Syncing With Two Out of Three Devices

    I use iTunes match on three devices, (1) a windows computer that is about 4 years old, (2) a Mac Book pro that I bought this spring, and (3) an iPhone 5. Before buying the Mac Book pro, the music library was created mostly though the windows computer

  • Translate Report Painter

    Hi! Can anyone explain me how to translate a report painter to another language? I've tried se63, but can't figure out how to do it... Thanks! Catia

  • Wacom Bamboo Writing

    I just purchased a Wacom Bamboo and it works on my Mac.  I just have one problem.  I bought it so I could WRITE on my documents, not have it convert it to text.  I am a teacher and I would love to be able to write on my word documents and my powerpoi