Results 1 to 2 of 2

Thread: XMLtype??

  1. #1
    Join Date
    Feb 2004
    Location
    inida
    Posts
    62

    Thumbs up Unanswered: XMLtype??

    hi...

    Im having insert triggers to a table.

    While running in SQL prompt im not getting any error,,but while im trying to insert to the particular table from JAVA class,
    im getting the following error.


    java.sql.SQLException: ORA-01861: literal does not match format string
    ORA-06512: at "APEXMASTER.PK_DBR_XML", line 2051

    In APEXMASTER.PK_DBR_XML package the line 2051 conatins the following data....

    select cr_type,
    extract(RETURN_XML,'//HEADER/CALLREPORT_ID/text()').getstringval(),
    substr(set_trn_id, 13,5),
    to_date(substr(set_trn_id, 18, 8),'DD-MM-YYYY')
    into lc_cr_type,
    lc_id,
    lc_inst_code,
    ld_date
    from apexmaster.tbsd_xmlrepository
    where file_id = p_file_id
    and trunc(download_date) = trunc(sysdate);

    in this line

    extract(RETURN_XML,'//HEADER/CALLREPORT_ID/text()').getstringval()

    return_xml is of the datatype XMLType.

    Can anyody tell me whats the problem??
    thanx.

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: XMLtype??

    Originally posted by neema
    hi...

    Im having insert triggers to a table.

    While running in SQL prompt im not getting any error,,but while im trying to insert to the particular table from JAVA class,
    im getting the following error.


    java.sql.SQLException: ORA-01861: literal does not match format string
    ORA-06512: at "APEXMASTER.PK_DBR_XML", line 2051

    In APEXMASTER.PK_DBR_XML package the line 2051 conatins the following data....

    select cr_type,
    extract(RETURN_XML,'//HEADER/CALLREPORT_ID/text()').getstringval(),
    substr(set_trn_id, 13,5),
    to_date(substr(set_trn_id, 18, 8),'DD-MM-YYYY')
    into lc_cr_type,
    lc_id,
    lc_inst_code,
    ld_date
    from apexmaster.tbsd_xmlrepository
    where file_id = p_file_id
    and trunc(download_date) = trunc(sysdate);

    in this line

    extract(RETURN_XML,'//HEADER/CALLREPORT_ID/text()').getstringval()

    return_xml is of the datatype XMLType.

    Can anyody tell me whats the problem??
    thanx.
    I think the problem is on this line:
    to_date(substr(set_trn_id, 18, 8),'DD-MM-YYYY')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •