URGENT: XML-SQL: Error parsing different date formats in the same XML file.

Hi Everyone,
I have a big problem while using the XML-SQL utility. I have a XML file with different date formats. I get exception like the one below.
"oracle.xml.sql.OracleXMLSQLException: 'java.text.ParseException: Unparseable date:"
And the XML file is :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Info Key="ID">
     <Insert>
          <ID>1</ID>
          <BookingDate>10.12.2001</BookingDate>
          <OpeningTime>19:16</OpeningTime>
     </Insert>
</Info>
I have tried using different setDateFormat which is contrary.
sav.setDateFormat("d.M.y");
sav.setDateFormat("H:m:s");
Can someone help me on the same.
Thanks in advance.
Subramanian.

You might have to describe the columns as varchar then modify the table to the right format.

Similar Messages

  • Problem with SQL*Loader and different date formats in the same file

    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    System: AIX 5.3.0.0
    Hello,
    I'm using SQL*Loader to import semi-colon separated values into a table. The files are delivered to us by a data provider who concatenates data from different sources and this results in us having different date formats within the same file. For example:
    ...;2010-12-31;22/11/1932;...
    I load this data using the following lines in the control file:
    EXECUTIONDATE1     TIMESTAMP     NULLIF EXECUTIONDATE1=BLANKS     "TO_DATE(:EXECUTIONDATE1, 'YYYY-MM-DD')",
    DELDOB          TIMESTAMP     NULLIF DELDOB=BLANKS          "TO_DATE(:DELDOB, 'DD/MM/YYYY')",
    The relevant NLS parameters:
    NLS_LANGUAGE=FRENCH
    NLS_DATE_FORMAT=DD/MM/RR
    NLS_DATE_LANGUAGE=FRENCH
    If I load this file as is the values loaded into the table are 31 dec 2010 and 22 nov *2032*, aven though the years are on 4 digits. If I change the NLS_DATE_FORMAT to DD/MM/YYYY then the second date value will be loaded correctly, but the first value will be loaded as 31 dec *2020* !!
    How can I get both date values to load correctly?
    Thanks!
    Sylvain

    This is very strange, after running a few tests I realized that if the year is 19XX then it will get loaded as 2019, and if it is 20XX then it will be 2020. I'm guessing it may have something to do with certain env variables that aren't set up properly because I'm fairly sure my SQL*Loader control file is correct... I'll run more tests :-(

  • Different Date Formats in the same "From"

    Hello
    We used different date formats depending on the users language.
    In a report this is simple to implement ... read the date field twice (in different formats dd/mm/yyyy and mm/dd/yyyy) and display only one based on the language.
    I want to be able to do the same in a "form" which updates a date. In this case the about is not allowed.
    Has anyone have solution for this using "APEX" forms or do a need to write a process to achieve this?
    Thanks
    Pete

    Pete,
    You don't specify what version of Application Express you're using, so I'll assume APEX 3.1 or later.
    Are you setting the date format yourself, based upon the user's language?
    1) You could have the application's language derived from Browser, and then APEX would automatically set the NLS_LANGUAGE and NLS_TERRITORY settings accordingly. Then, I would simply use 'DS' as the Application Date Format. For Date Pickers on a form, I would use item type 'Date Picker (use Application Date Format)'.
    2) If you're already determining the date format yourself and you don't want APEX to do it for you, ensure that you are setting this value in an application item (e.g., PETE_DATE_FORMAT). Then, you could still use Application Date Format with a value of &PETE_DATE_FORMAT. (inclusive of the trailing period).
    When you use Application Date Format, the conversion should happen automatically for you so that you don't have to code this yourself on the Form.
    I hope this helps.
    Joel

  • XML SELECT error ORA-01830: date format picture ends before converting enti

    Apologies, If I have to open a new thread. I have a similar problem and would be grateful if you can help:
    Created a view based on an xsd. View works fine. However when selecting data from the view, the xml output is scrambled. On search found there is a pretty print function which can be added when creating the view: .extract('/*') as:
    ).extract('/*')
    as RBid
    from Balit_Submissions bs
    Again the view gets created successfully. But when doing the same select from it get the error:
    ERROR:
    ORA-01830: date format picture ends before converting entire input string
    I have narrowed it down to the .xsd definition of the tag: <xsd:element name="CreationDateTime" type="ecc:MessageDateTimeType">
    In the view, CreationDateTime is selected as follows:
    ,XMLelement("CreationDateTime",xmlattributes(to_char(bs.creation_datetime,'yyyy-mm-dd"T"hh:mi:ss"Z"') as "v"))
    where the column bs.creation_datetime is Oracle data type DATE.
    The MessageDateTimeType is defined in Oracle as a timestamp.
    Any hints to overcome this.
    Using: Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - Production
    I will paste the full .xsd and view if required.
    Thanks
    James Sathiaraj

    Indeed a small test case would be great. Not sure if I could reproduce - have touched 10.1.0.5 in 4, 5 years...

  • How to handle Multiple date formats for the same date field in SQL*Loader

    Dear All,
    I got a requirement where I need to get data from a text file and insert the same into oracle table.
    I am using SQL*Loader to populate the data from the text file into my table.
    The file has one field where I am expecting date date data in multiple formats, like dd/mon/yyyy, yyyy/dd/mon, yyyy/mon/dd, ,mm/dd/yyyy, mon/dd/yyyy.
    While using SQL*Loader, I can see Loading is failing for records where we have formats like yyyy/dd/mon, yyyy/mon/dd, mon/dd/yyyy.
    Is there any way in SQL*Loader where we can mention all these date formats so that this date data should go smoothly into the underlying date column in the table.
    Appreciate your response on this.
    Thanks,
    Madhu K.

    The point being made was, are you sure that you can uniquely identify a date format from the value you receieve? Are you sure that the data stored is only of a particular limited set of formats?
    e.g. if you had a value of '07/08/03' how do you know what format that is?
    It could be...
    7th August 2003 (thus assuming it's DD/MM/RR format)
    or
    8th July 2003 (thus assuming it's MM/DD/RR format)
    or
    3rd August 2007 (thus assuming it's RR/MM/DD format)
    or
    8th March 2007 (thus assuming it's RR/DD/MM format)
    or even more obscurely...
    3rd July 2008 (MM/RR/DD)
    or
    7th March 2008 (DD/RR/MM)
    Do you have any information to tell you what formats are valid that would allow you to be specific and know what date format is meant?
    This is a classic example of why dates should be stored on the database using DATE datatype and not VARCHAR2. It can lead to corruption of data, especially if the date can be entered in any format a user wishes.

  • How can I copy SQL results to different csv worksheets in the same workbook

    Hi all,
    I'm running a series of select statements using SQLPlus and I want the results for each statement to be copied to different worksheets within the same workbook.
    For example, this is what I want: 'select statement 1' is run and spooled to file.csv / worksheet1. When 'select statement 2' is run it is spooled to file.csv / worksheet2. Same csv file but a different worksheet.
    Right now my SQL is creating a seperate csv file for each select statement. Here's an example of my SQL:
    spool c:\TEMP22\App_Eng1.csv replace
    Select A.OBJECTOWNERID||','||B.OBJECTVALUE1
    from PSPROJECTITEM B, PSAEAPPLDEFN A
    Where B.PROJECTNAME = 'PRJETSC342'
    and B.SOURCESTATUS = 2
    and B.TARGETSTATUS = 1
    and B.OBJECTVALUE2 = ' '
    and B.OBJECTTYPE=33
    and A.AE_APPLID = B.OBJECTVALUE1;
    spool off
    Is what I want to accomplish possible? Any ideas? Thanks.

    As far as I know you can't have "worksheets" for .csv files. They are simply comma separated values (a flat file). I would suggest that you generate separate csv files for each of your queries and then create a new xls file and import each csv file as a new worksheet.
    If you want to automate this process, I recommend you read this:
    http://blogs.msdn.com/brian_jones/archive/2005/06/27/433152.aspx

  • Different page formats in the same document

    Is it at all possible to create an InDesign-document with different page formats? Example: Page 1: 210x297 mm, page 2: 190x297 mm.

    only by using this:
    http://www.dtptools.com/product.asp?id=pcid
    robin
    www.adobescripts.com

  • Different HD formats on the same timeline

    Hi
    I am currently editing a 6 camera HD project in FC Studio 2, I have footage that is 5D 1920x1080i H264, other footage is 1920x1080p prores, and then I have some footage that is 1920x1080i and the compression is 1440x1080 frame rates are 30frms some are 15frms.
    My question: is there any way to edit the timeline with out needs only render. I have to synch clips by sound du to the fact that I have no matching TC so option p really wouldn't work. example some 10sec clips need 20 minutes to render, was just wondering if there was anyway to disable needs render until I finish the edit.
    I hope that I explained this easily enough, I have a feeling that I'm just going to have to suffer through it.
    Best,
    S

    You should probably convert all your media to a single format, like ProRes422,
    with all the same frame rate. Create a new FCP project with the converted media
    nicely imported and well-named.
    Then use Media Manager to make lower-resolution proxies for editing
    (FCP Manual IV-114). Start your mulitclip editing process by getting your
    sync perfect. Take some extra time to verify that you've got it figured out.
    As you edit using a multiclip, don't render the timeline. That disables
    the multiclip editing function. If you need to render to check out your
    work in detail, be sure to trash the render file before continuing to edit.
    When you're done with the edit, use Media Manger to reconnect your
    clips to the full-resolution version.

  • Can use different sequence settings on the same project file ?

    I have 2 camcorders now, one is a AVCHD and the other is HDV tape.
    QUESTION 1:
    As the former is 1920 x 1080 and HDV is 1440 x 1080, can I use all the clips of 1920 x 1080 in sequence 1 and all the clips of 1440 x 1080 in sequence 2 (both sequence 1 & sequence 2 are in the same .fcp project file) ?
    QUESTION 2:
    I often seen Tom saying the settings in Easy setup and be the same settings in the sequence settings.
    If in Easy Setup, I select AVCHD PAL - 1920 x 1080i50, how do I select the same for sequence settings ?
    Thanks

    1. A qualified yes because I don't know what sequence 1 and 2 are.
    2. The easy setup is your sequence setting. Make a new sequence and it will be in that format.
    If you want to mix the media from those it cameras it would probably be better if you can switch the AVCHD camera to shoot 1440x1080; most can do that, and it would then match the media from the HDV camera.

  • Date format in the file datastore

    Hi,
    I have source as file, in which I have date column. While creating the file datastore, I have selected the datatype as date & have given the source date format in the format column and it is working fine.
    But I have source file coming with different date formats for the same column.
    My question is whether i can give multiple date formats in the format column??
    1. If yes how to separate the formats i.e with comma or semi-colon or etc...
    2. If No, thn how to achieve it. as I can use to_date function, but in that also I have to give all the date formats.

    Assuming Oracle is target database..
    Try this...
    1. In your file data store make the column as Varchar2
    2. In the interface mapping -- specify the following string in the target column mapping
    TO_DATE(REPLACE('2011-06-01','-',''),'YYYYMMDD')
    If your target column is date, Oracle will convert database proper format and insert the date..
    Hope this works out....
    Thanks
    Satish
    Edited by: user12826256 on 01-Jul-2011 02:15

  • XML-22108: (Error) Invalid Source - URL format is incorrect

    Hi,
    When following statement is executed from PERL getting err msg.
    `$JAVA_RUNTIME org.apache.xalan.xslt.Process -in $work_xml_file -xsl $xsl_file -out $sql_file 2>&1`;
    XML-22108: (Error) Invalid Source - URL format is incorrect.
    XML-22000: (Fatal Error) Error while parsing XSL file (no protocol:xsl file).
    Exception in thread "main" java.lang.NullPointerException
    at oracle.xml.parser.v2.DOMLocator.getPublicId(DOMLocator.java:101)
    at org.apache.xml.utils.DefaultErrorHandler.printLocation(DefaultErrorHandler.java:341)
    at org.apache.xalan.xslt.Process.main(Process.java:1091)
    Kindly help me to resolve the issue.
    Thanks and Regards,
    Vijay

    Hi Alosh,
    Thanks for the reply.
    We are in process of upgrading Oracle Apps R11i into R12. This statement works fine in 11i but not working in R12. I think issue is not with -IN, -XSL and -OUT parameters.
    Thanks and Regards,
    Vijay

  • SQL Loader Error : ORA-01830: date format picture ends before converting en

    I am inserting following data
    BES101706     M.E. Deals     7     10/17/2006
    through control file :
    LOAD DATA
    APPEND
    INTO TABLE abc_temp
    FIELDS TERMINATED BY ' '
    TRAILING NULLCOLS
    (BATCH_NAME               ,
    SUPPLIER_NAME          ,
    SUPPLIER_NBR          ,
    INV_DATE "to_date(substr(:INV_DATE,1,10),'MM/DD/YYYY' )"
    But I am getting this error:
    ORA-01830: date format picture ends before converting entire input string
    inv_data is a date field in the database.

    I think it has to do with data format.Exactly.
    You have
    BES101706*M.E.*Deals*7*10/17/2006
    I replace each space with an asterisk. You have 5 columns according to your spec (terminated by '<space>')
    SQL Loader doesn't know that M.E. Deals is the supplier name.
    It's trying to convert 7 as the date.

  • Receiving error when calculating two fields with different date format

    I am more familiar with SQL Server than Oracle, so after searching online without success, I am asking here.
    I'm using PL/SQL Developer with Oracle DB 11g Enterprise Release 11.2.0.2.0 64 Bit
    MyTable:
    ID_Number     VarChar2
    Date_Received     Date
    Select ID_Number,
         Date_Received,
         To_Date(substr(ID_Number, 1,6), 'YYMMDD') SentDate,    
         Date_Received - To_Date(substr(ID_Number, 1,6), 'YYMMDD') NumDays
    From MyTable
    Where substr(ID_Number, 7,3) in ('ABC', 'ABD')
    and Length(Trim(Translate((substr(ID_Number, 1,6)), '0123456789', ' ' ))) is null
    ID_Number                    Date_Received          SentDate          NumDays
    131002ABC1654106     10/16/2013               10/2/2013          14
    131004ABD8813899     4/12/2013                 4/8/2013            4
    131014ABD1844832     10/16/2013               10/14/2013          2
    Sometimes the first 6 characters in the ID_Number are not numbers, and the Length(Trim(Translate removes those records
    I just want records where NumDays > 2
    I've tried putting the query in a subquery and using Where NumDays > 2 outside.  I've also tried using the computation directly in the Where clause.  Without this in the Where clause it runs fine, with it in either spot I get the following error:
    ORA-01931: Date format picture ends before converting entire input string
    I'm not sure how to put both dates in the same format.  I've tried declaring the format to no avail.  I do not understand how I can calculate within the select but not use the same calculation within the Where clause.
    Thank you for your help.

    Hi,
    SQL is a language for describing the results you want.  How the system gets those results is up to it; you don't have much say regarding which conditions will be applied when.
    One place where you can control the order of things is in a CASE expression.  When you say
    CASE
        WHEN  condition_1
        THEN  expression_1
    END
    you can be sure that expression_1 will only be evaluated when cond_1 is TRUE.
    Try something like this:
    WITH  got_sent_date AS
        SELECT  id_number, date_received
        ,       CASE
                    WHEN  TRANSLATE ( SUBSTR (id_number, 1, 6)
                                    , 'x 0123456789'
                                    , 'x'
                                    )  IS NULL
                    THEN  TO_DATE ( SUBSTR (id_number, 1 6)
                                  , 'YYMMDD'
                END     AS sent_date
        FROM    MyTable
        WHERE   SUBSTR (id_number, 7, 3) IN ('ABC', 'ABD')
    SELECT  id_number
    ,       date_received
    ,       sent_date
    ,       date_received - sent_date    AS num_days
    FROM    got_sent_date
    WHERE   date_received  > sent_date + 2
    If you'd care to post some sample data (CREATE TABLE and INSERT statements) and the results you want from that data, then I could test this.
    Of course, you'll still have run-time errors if id_number starts with 6 digits, but they don't happen to be valid, e.g. '131100' or '130229'.  That's one of the many reasons why storing date information in VARCHAR2 columns is such a bad idea.  To get around that problem, see
    https://forums.oracle.com/message/4255051

  • Java.sql.SQLException:ORA-01801:date format is too long for internal buffer

    Hi,
    I am getting the following exception when i trying to insert data in to a table through a stored procedure.
    oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-01801: date format is too long for internal buffer
    when execute this stored procedure from ana anonymous block , it gets executed successfully, but i use a OracleCallableStatement to execute the procedure i am getting this error.
    Please let me know how to resolve this error.
    Is this error something to do with the Database Configuration ?
    Thanks & Regards
    Meenal

    I don't know if this will help, but we were getting this error in several of the standard OA framework pages and after much pain and aggravation it was determined that visiting the Sourcing Home Page was changing the timezone. For most pages this just changed the timezone that dates were displayed in, but some had this ORA-01801 error and some others had an ORA-01830 error (date format picture ends before converting entire input string). Unfortunately, if you are not using Sourcing at your site, this probably won't help, but if you are, have a look at patch # 4519817.
    Note that to get the same error, try the following query (I got this error in 9.2.0.5 and 10.1.0.3):
    select to_date('10-Mar-2006', 'DD-Mon-YYYY________________________________________________HH24:MI:SS') from dual;
    It appears that you can't have a date format that is longer than 68 characters.

  • Different Date Formats on CRM and BI Client

    Hi,
    When trying to run the CRM Interactive Report "Accounts with Open Activities", I receive the following error:
    Different date formats on CRM and BI client 01/13/2009 13.01.2009 SC5CLNT200
    Does anybody know how to resolve this error?
    Thanks

    Hi Peter,
    As far as i remember, I had the same issue.
    Once I matched the date format in reporting client using SU01 on default tab with CRM date format, I did't see the error again.
    Did you try restarting the Browser & also relogin GUI.
    Else lets see what else can be done.
    Best Regards
    Shiven

Maybe you are looking for

  • How to create a control and add it to a page layput

    I am reading the following link :- http://www.itidea.nl/index.php/what-about-you-must-fill-out-all-required-properties-before-completing-this-action-when-publishing-a-page/ which says that i need to create a control and add it to a page layout. but c

  • Aperture won't open in OS 10.5.5

    Hi people. Ok. I'm using an Intel Mac, with 3gb RAM. I've just taken some photo's with my Canon EOS 400D in RAW format. I plugged my camera in and flicked it on just so i could drop the images in iPhoto for some simple adjustments. The camera screen

  • How to send data from popup window to parent window

    Hi, I need help some like this I have parent window ,in that i am clicking + button one dynamic row should add and one popup window has to diplay .Popup window contain 3 comboboxes and 5 text boxes. Once i am clicking OK button in popup window those

  • How can I edit individual video frames?

    I have been searching the web and scratching my head trying to figure out a way of scrubbing a bit of content out of a few frames in a video. I have iMove (the latest version) and I have Final Cut Express (obviously a few years old now) and would be

  • Printing envelopes on officejet 8600 from Endicia, OSX

    I've used endicia for years, and my previous three HP printers worked fine. My new OJ 8600, however, refuses to line up correctly on the envelopes. The print is waaaay off to the right, and if I change the printer setup in endicia (as their tech supp