Oracle date conversion

Hi all,
maybe anyone of you knows an answer to this:
Why does Oracle accept a date in format dd.mm.yyyy without explicitely converting to dd-mmm-yy in Windows but not in Solaris ? (It's the same program code producing exactly the same sql statement.)
Thank you
Marko

Hi Date format in Oracle is entirly depand on the NLS_DATE_FORMAT . You can see NLS parameter in V$NLS_PARAMETERS table of your database.. You can change for Your session using
ALTER SESSION
SET NLS_DATE_FORMAT ='dd/mm/yyyy'
But this is aplicable to your session only.. Please check this parameter in both Soraris as well NT ..
Regards
Pradeep Jain

Similar Messages

  • Sybase to Oracle Data Conversion

    Whats the quickest way to move data from Sybase to Oracle ? What options are available ?
    Database objects (table ddls, procs, triggers - everything else is already in place in Oracle) - already provided by Vendor.
    Overview about the database :
    Datatype difference
    Sybase datetime converted to Oracle Timestamp
    Other datatypes are related
    int - int
    char - char
    varchar - varchar
    Timestamps are part of PK & FK in few tables.
    Approx 1000 tables to convert
    Some tables have 25- 75 million rows
    Thank you
    Yog

    Another approach you might like to try is to use the manual approach of data migration.. where underlying idea is to bcp out the data from Sybase and thereafter use sqlloader to load data into the oracle tables.. and if you happen tro use DIRECT=TRUE with sqlloader nothing better.... its really fast..
    sql developer would generate the bcp out script.. extract the scripts... run them on the sybase host ...move the dump files to oracle host... run the sqlloader scripts..
    AT our end 15G worth data migration took 1 day using sql developer but the manual approach would do the stuff in 3-4 hours.
    Anyway would like to put 1 issue I am facing..
    In sybase the datetime contains the values to the level of Milisecond whereas when it comes to date column in Oracle it is just to the level of seconds .. => that if there is a primary key sybase table column.. and this truncation at orale level would make the inserts to fail with duplication errors... any thoughts on how to overcome this problem....
    Thanks
    Praveen

  • GL Data Conversion from Legacy to Oracle EBS

    Hi All,
    I am tasked with converting legacy data into GL. I have worked on other conversions like supplier, AR and AP conversions but never worked on GL conversion, so I don't know how and where to start, what are the pre-requisites for entering data into gl_interface table how to ensure that data is correct in the .csv file etc.
    Kindly request you all to guide me in right direction. Hope to hear from you all very soon!!! :)
    Regards

    Hi,
    When you talk about GL-Data it is the trial balance to be loaded from legacy to oracle applications.
    You can use Web-ADI to upload it ,the check list are
    The balance for each account comibnation in the legacy system to be mapped to GL-Oracle code combination balance
    With respect to open AR, AP Invoices if the invoices are converted using a control account for migration in GL then
    the the balance transfered from AP,AR need not be reversed in GL from the source receivables and payables.
    In case if the same account combination are for migrating the balances from AP,AR to GL ..Then the balances transferred from AP,AR should be reversed ..so that it does not affect the TB-GL-Balance
    Finally ensure that the balance for the TB-tallys with your legacy system and upload it using Web-ADI ,import and
    review and post it.
    Hope this points helps your GL-Data conversion.
    Regards,
    Ramaa

  • RE: Oracle DATE data format conversion..

    <C.M> Motta's question about dates and oracle>
    Dealing with dates and Oracle is somewhat of a nuisance. Oracle is very
    particular about how date strings are formatted, and if you get it wrong,
    you get the (unhelpful) message that C.M. Motta showed us. However, if
    you pass a DateTimeData to Oracle, Forte' does the right formatting for you.
    If you do need to format the date prior to interacting with Oracle, use the
    following format:
    dd-mmm-yy <time component>
    You can change the default format, but it is not easy.
    If you customise Express generated code that interacts with an Oracle
    database, again, make sure that you pass a DateTimeData, and not the
    .TextValue.
    Good luck!
    Richard Kirk

    Date: Wed, 06 Nov 1996 08:18:37 -0500
    To: "C. M. Motta" <[email protected]>
    From: Jim Milbery <[email protected]>
    Subject: Re: Oracle DATE data format conversion..
    Cc: [email protected]
    Cheers:
    Most likely what is happening is that you are using the default date
    format of Oracle, and you are sending a four-character year. As follows:
    SQL> insert into jimbo values ('01-dec-1997')
    2 /
    insert into jimbo values ('01-dec-1997')
    ERROR at line 1:
    ORA-01830: date format picture ends before converting entire inputstring
    >
    Oracle defaults to a format of 'dd-MON-yy'
    You can either truncate the year, or manipulate the date to match the standard
    database as follows:
    insert into jimbo values (to_Date('01-jan-1997', 'DD-MON-YYYY'))
    \jimbo
    At 09:21 AM 11/6/96 -0200, you wrote:
    Forte Users,
    First, Id like to thank all those who answered my question on
    droplist & SQL. I got just what I was looking for: its up and runnunig
    now.
    I have another question: Im trying to insert a DATE into an Oracle
    database. The source date is:
    data : DateTimeData = new;
    data.SetCurrent();
    So, when I try to insert data.Value or data.textvalue into DB, I
    get the following exception:
    ORA-01830: date format picture ends before converting entire
    input string.
    Are there any suggestions?
    Thanks for your help,
    C.M. Motta
    ====================================================================
    Jim Milbery
    Milbery Consulting Group
    132 N. West St., Allentown, PA 18102
    O: 610 - 432 - 5350 F: 610 - 432 - 5380
    E-Mail : [email protected]
    ====================================================================

  • Issue with Date Conversion when loading XML File into Oracle 10g Database

    Hello all,
    I have the interface shown in the screenshot below. In it, amongst other actions, I'm mapping an XML file element representing a date to an Oracle table column defined as DATE. The source and target columns are highlighted in the screenshot.
    !http://img223.imageshack.us/img223/1565/odiscr275.jpg!
    When I execute the interface, I get the following error message:
    java.lang.IllegalArgumentException at java.sql.Date.valueOf(Date.java:103)
    I'm assuming this refers to the date conversion!
    I've already tried replacing SRC_TRADES.DEAL_DATE with TO_DATE( SRC_TRADES.DEAL_DATE, 'DD/MM/YYYY' ) in the Implementation tab. This function was not recognised when I executed the interface, so it didn't work! The date value in the XML file is in DD/MM/YYYY format.
    I'm guessing that Oracle SQL Date functions don't work in the Implementation tab. Please could somebody let me know:
    1. Which Date Conversion function I could use instead?
    2. Where I can find a reference for the methods/functions I can use in the Implementation tab (if such a reference exists)?
    Cheers.
    James

    Hi.
    Try to change the execution area to staging area. After You change it, write in the mapping box just SRC_TRADERS.DEAL_DATE. When You use TO_DATE, the source field typu should be varchar2, not date (as it is in your source datastore)

  • SQL Server Date Conversion to Oracle Date

    I am new to ODI and am trying to figured out how to move a SQL Server date datatype value to an Oracle date.
    Thanks in advance.

    SQLServer datetime datatype is moved to an Oracle TIMESTAMP datatype via the technology's data type mapping. That particular LKM 'SQL to SQL' is written in java so reads from SQLServer into java datatypes then writes back out to Oracle.
    Cheers
    David

  • Data conversion for OAF pages

    Hi,
    Can dataload handle data upload in OAF application? or
    Is there any tools in the market for data conversion that is for OAF, instead form based application.

    Have you read Metalink Note 563047.1 - Using Oracle Application Framework (OAF) and Application Development Framework (ADF) ?

  • Data Conversion for Project Module

    Dear all,
    I have a requirement to perform data conversion for Project module from 11.5 to R12. I am new to this module. Can anybody can outline (or provide documentation reference):
    1)Source tables in 11.5
    2)Data Selection for source tables in 11.5
    3)Validations need to be performed for data clean up
    4)Interface tables and interface programs in R12
    Thanks,
    Sudip

    See the following links for information on all R12 interfaces
    Oracle Integration Repository Documentation Resources Release 12 (Doc ID 396116.1)
    Note: 462586.1 - Where are the Oracle® Release 12 (R12) API Reference Guide?
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=462586.1
    Note: 458225.1 - Release 12 Integration Repository
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=458225.1
    If you are on 11i, go to irep.oracle.com
    Hope this helps,
    Sandeep Gandhi

  • Data Conversion for BOMs and/or Routings

    I am looking for any examples for design spec for Data Conversion of Bill of Materials and/or Routings.
    Not sure if this would be in form of MD050 but any example would be appreciated

    Hi;
    Please check below links:
    Oracle Bill of Materials User's Guide
    http://download.oracle.com/docs/cd/A85683_01/acrobat/115bomug.pdf
    http://horizon.more4apps.com/doco/BMWRelease/output/index.htm
    Also see:
    Getting Started With R12 - Discrete Manufacturing Support Enhanced Release Content Document [ID 415922.1]
    Regard
    Helios

  • Data Conversion issue

    Hello I'm new to Oracle DB and still learn SQL.
    I have a problem with data conversion in a CASE expression.
    Example:
    select ... ,     
    CASE column WHEN 1 THEN
    select max(column)
    from table
    where ...
    ELSE 0 END AS value,
    from     ...
    where ...
    order by ...
    What I'm basically intend to do is to select a value from another table depending on the value of
    a special column.
    The problem now is that the
    select max(column)
    from table
    where ...
    statement in its original form selects the right value as float (e.g. 0.24)which I need.
    But the same statement embedded in the CASE expression returns (e.g. 0 ) which seems to be the same result converted to an integer or something.
    I tried to convert the result in the CASE expression but without success.
    Does anybody know what could cause this behavior and how to fix it ?
    Thanks for any help with this.

    Welcome to the forum!
    Whenever you have a problem, post a complete script that people can run to re-create the problem. Include CREATE TABLE and INSERT statements for a little sample data if necessary. (A lot of folks show the problem using commonly available tables, such as those in the scott or hr schemas, so they don't have to post any sample data.)
    if your problem involves an error message, post the complete error message you're getting, including line numbers.
    Always say which version of Oracle you're using, e.g. 10.2.0.1.0.
    Sorry, I can't re-create the problem.
    I did something as similar as I could to what you posted:
    SELECT       deptno
    ,       CASE deptno
              WHEN  10
              THEN  (
                   SELECT  MAX (sal)
                   FROM     scott.emp
                   WHERE     deptno     = d.deptno
              ELSE  0
           END          AS value
    ,       dname
    FROM       scott.dept     d
    WHERE       deptno     <= 30
    ORDER BY  deptno
    ;And it ran, producing this output:
    `   DEPTNO      VALUE DNAME
            10       5000 ACCOUNTING
            20          0 RESEARCH
            30          0 SALES
    886562 wrote:Hello I'm new to Oracle DB and still learn SQL.I've been using Oracle for 20 years, and still learn SQL.
    select ... ,     
    CASE column WHEN 1 THEN
    select max(column)
    from table
    where ...
    ELSE 0 END AS value,
    The problem now is that the
    select max(column)
    from table
    where ...
    statement in its original form selects the right value as float (e.g. 0.24)which I need.
    But the same statement embedded in the CASE expression returns (e.g. 0 ) which seems to be the same result converted to an integer or something.Are you sure that 0 is being returned by the sub-query in the THEN clause, and not by the ELSE clause?
    I tried to convert the result in the CASE expression but without success.What did you try? Post your code.
    What problem did you have? Post the error message.
    Edited by: Frank Kulash on Sep 21, 2011 6:15 AM

  • GL Legacy Data Conversion

    I have a question for the data conversion strategy.
    We are planning to store 2 yr detailed transactions and 4yr balances in Oracle system. In terms of the data conversion process, we were also going to take the same method. It would, however, cause schedule and workload constraints. Actually, we have not yet discussed this from realistic view points. In other words, we do not insist on storing all of data which are 2yr transaction and 4yr balances.
    Although I believe that we will be able to eliminate a volume of the data to be converted to new chart of accounts from old ones, I am a little bit concerned about a couple of things as follows:
    1. the workload for reporting processes
    Assuming that we will not use Oracle standard reports so much, it would not be a big issue, even if we do not convert all of data I mentioned above. We will store historical report data somewhere, and be able to generate certain reports using both Oracle data and historical data in the repository. If not, it could cause us extra efforts.
    2. Audit trails / Examination trails
    If we give up converting the data to fit new system, and that fiscal year has not been examined yet, how should we handle non-converted data for the examination? I am just wondering whether or not, we have only to prepare the conversion table, that ties Oracle balances back to ABC detailed transactions for their reference.
    If anyone is are aware of anything you can advise me, could you please provide some information or guidance? Thanks to ALL.

    Hi,
    When you talk about GL-Data it is the trial balance to be loaded from legacy to oracle applications.
    You can use Web-ADI to upload it ,the check list are
    The balance for each account comibnation in the legacy system to be mapped to GL-Oracle code combination balance
    With respect to open AR, AP Invoices if the invoices are converted using a control account for migration in GL then
    the the balance transfered from AP,AR need not be reversed in GL from the source receivables and payables.
    In case if the same account combination are for migrating the balances from AP,AR to GL ..Then the balances transferred from AP,AR should be reversed ..so that it does not affect the TB-GL-Balance
    Finally ensure that the balance for the TB-tallys with your legacy system and upload it using Web-ADI ,import and
    review and post it.
    Hope this points helps your GL-Data conversion.
    Regards,
    Ramaa

  • ORA-01841 Converting SQL Server DateTime to Oracle Date

    I have Oracle 11gR2 x64 running on my Win7 Enterprise x64 personal system. I'm trying to convert the TSQL to create a database in SQL Server 2008 Express for my C# class to Oracle, and I've run into a "interesting" problem loading date data.
    The SQL Server 2008 TSQL InvoiceDate column in the Invoices table has datatype DATETIME:
    *[InvoiceDate] [datetime] NOT NULL,*
    which Oracle does not support. The Oracle InvoiceDate column in the MMAB_Invoices table has datatype DATE:
    InvoiceDate DATE NOT NULL,
    The fun begins with the TSQL INSERT statements (for example):
    INSERT [dbo].[Invoices] ([InvoiceID], [CustomerID], [InvoiceDate], [ProductTotal], [SalesTax], [Shipping], [InvoiceTotal]) VALUES (18, 20, CAST(0x00009CFD00000000 AS DateTime), 151.0000, 11.3300, 6.2500, 168.5800)
    As you can see, whoever wrote the load script thought it would be totally awesome to convert hex (binary?) data to generate a date, instead of using data readable by a human being.
    BTW, the date generated is 2010-01-13 00:00:00.000.
    After Reading The Fabulous Manual and searching the OTN Discussion Fora, what I came up with is
    INSERT INTO MMAB_Invoices (CustomerID, InvoiceDate, ProductTotal, SalesTax, Shipping, InvoiceTotal) VALUES (20, TO_DATE(UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW('00009CFD00000000')), 'YYYY-MM-DD HH:MI:SS'), 151.0000, 11.3300, 6.2500, 168.5800);
    which returned
    Error starting at line 846 in command:
    INSERT INTO MMAB_Invoices (CustomerID, InvoiceDate, ProductTotal, SalesTax, Shipping, InvoiceTotal) VALUES (20, TO_DATE(UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW('00009CFD00000000')), 'YYYY-MM-DD HH:MI:SS'), 151.0000, 11.3300, 6.2500, 168.5800)
    Error report:
    SQL Error: ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    *01841. 00000 - "(full) year must be between -4713 and +9999, and not be 0"*
    **Cause: Illegal year entered*
    **Action: Input year in the specified range*
    The PK InvoiceID is automatically generated by a BEFORE INSERT trigger that uses a sequence.
    Suggestions?
    Thanks.
    P.S. Happy New Year!!!

    Your hex conversion is certainly not returning a date format:
    sql> select UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW('00009CFD00000000')) from dual;
    UTL_RAW.CAST_TO_VARCHAR2(HEXTORAW('00009CFD00000000'))
      ┐²To convert the hex number to decimal, simply use to_number:
    sql> select to_number('00009CFD00000000', 'xxxxxxxxxxxxxxxx') from dual;
    TO_NUMBER('00009CFD00000000','XXXXXXXXXXXXXXXX')
                                          1.7261E+14Now, before you can make any further calculations with that number, you need to know how it represents the date of 2010-01-13. Luckily, we've got Google nowadays. ;-)
    Sql server representation seems to be an 8 byte field. The first 4 bytes stores the number of days since SQL Server's epoch (1st Jan 1900). The second 4 bytes stores the number of milliseconds after midnight.
    sql> select to_number('00009CFD', 'xxxxxxxxxxxxxxxx') from dual;
    TO_NUMBER('00009CFD','XXXXXXXXXXXXXXXX')
                                       40189
    sql> select to_date('1900-01-01','yyyy-mm-dd') + 40189 from dual;
    TO_DATE('
    13-JAN-10So, the conversion would be something like this:
    sql> select to_date('1900-01-01','yyyy-mm-dd') + to_number(substr('00009CFD00000000',1,8), 'xxxxxxxx') + to_number(substr('00009CFD00000000',9,8), 'xxxxxxxx') / (24*60*60*1000) from dual;
    TO_DATE('
    13-JAN-10Note: Oracle DATE format specifies a datetime up to the second, whereas the sqlserver DATETIME format specifies a datetime up to the millisecond; if that precision is needed, use Oracle's TIMESTAMP instead.
    Note: using an internal representation is risky, implementation details may change. In this case, it seems pretty unlikely that Microsoft will ever change the datetime internal representation, since that would break lots and lots of code.
    Edited by: theoa on 2-jan-2012 9:14

  • Can I define a SQL Server View to Oracle data?

    So I have a subset of data whose source of truth resides in an Oracle Database. Can I define a SQL Server View to retrieve this subset of data and make it available on the SQL Server side for say Reporting and SSRS? I think I also saw where they tend to
    prefer User-Defined functions as opposed to a view. If I define the view using an OPENQUERY, I have noticed that it seems to run FOREVER on the SQL Server side and returns pretty timely if I run in Oracle SQL Developer. Is there anything I can tweak to improve
    this timeliness or lack there of?
    And the whole reason I'd like to create a view of this Oracle data is so that I can take advantage of all the views and functions that we have created on the SQL Server side.
    Has anyone gone down this path and can offer some advice and web sites or YouTubes as to the best way to approach this?
    Thanks for your review and am hopeful for a reply while I keep Googling this.

    There are couple of ways by which you can connect and fetch the data
    OPENQUERY - which you are already using [uses linked server] -
    runs on remote server
    OPENROWSET - I would like to avoid this because it requires crenditials
    OPENDATASET - Similar issue like OPENROWSET
    Directly access linked server like LINKEDSERVER.DATABASE.SCHEMA.TABLE -
    runs on your local server
    Now, performance
    basically, they have the same performance advantages and disadvantages when connecting to remote server. But you can enhance it by 
    Avoiding data conversion 
    Using procedure on Oracle and then call it from SQL Server (due to compiled plan your result will be faster)
    Avoiding dealing with complex data types
    If you are dealing with large number of records, try using Oracle connector in SSIS. I found it working much better than SQL sometimes.
    Hope this will help
    Glad to help! Please remember to accept the answer if you found it helpful. It will be useful for future readers having same issue.
    My Profile on Microsoft ASP.NET forum

  • Cannot Enter Oracle Date

    I am using WLW to create a simple interface to an Oracle table containing date
    columns.
    The tool by default defines the XML schema as dateTime, and I get the following
    error upon inputting a date in the format "ccyy-mm-dd".
    I have tried manually edited the code to change things from TIMESTAMP to DATE,
    sql.Timestamp to sql.Date, etc. but haven't gotten around the error.
    Any advice on the best way to handle inputting Oracle dates would be appreciated.
    Caught an error converting a String to a java.sql.Timestamp
    Caught an error converting a String to a java.sql.Timestamp
    NetUI Warning: Unable to update expression "{actionForm.est_start}". The typical
    cause is that the object represented by the expression is not available or is
    the wrong type for updating. Cause: com.bea.wlw.netui.script.ExpressionUpdateException:
    Exception when attempting to update the expression "{actionForm.est_sta
    rt}" with available binding contexts [actionForm, pageFlow, globalApp]. Root cause:
    java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff

    Hi,
    When setting properties on form beans we have to do type conversions if the form's property is something other than String. So if your timestamp format does not match the format our type conversion code parses, then there will be errors. If that is the case here, then the solution is to change the type of the form bean's property to String and convert it to a timestamp internal to the form bean.
    Let me know, if it works.
    Regards,
    Muthu.

  • Data conversion rule manager & repository

    Hi All,
    We are running a fairly large legacy data conversion project from IMS and DB2 to Oracle which will involve quite a variety range of conversion/mapping rules (complex data manipulation to simple mapping). These requirement and rules involve both tech and business collaboration. Are there any data conversion rule managers tool out there that provide these type of capabilities:
    1. Data conversion rule repository and version control
    2. collaboration features (e.g. collaboration editing, commenting, decision capture, approval...etc)
    We have check someed of the tools out there, and they are either generic requirement gathering tools, which is basically a few tabs with drop downs and a big text box, or some end-to-end data conversion automation solutions, which focus the execution of the data conversion instead of managing & tracking conversion rules.
    Can anyone you help? please let me know if there is anything comes close that is practical and useful. Thank you.

    Tubby, thank you for the info. Yes, we actually use ODI as a DEV tool for data conversion rule implementation and execution between our staging DB and target DB. However, ODI does not really have the capability to allow our tech and business to collaborate together and focus on "getting all these rules defined correctly". Having say that, ODI does have many very useful side features for our DEV to leverage and share information such as knowledge module and data mapping...etc
    We would hope to have a practical data rule management tool & repository that allows tech and business to work together and gather all the rules and build up all the knowledge base in 1 single place. DEV/QA can then take away and focus on the implementation and validation.
    Please let me know. Thank you very much.

Maybe you are looking for

  • Configuration is failed - BPM for Weblogic 10.3.1

    1, I install BPM for Weblogic. 2, I create a domain for weblogic using config tool and start it. 3, I create a new directory. However, the configuration is failed. The BPM for weblogic is installed in XP and the window of selecting JDK is not pop out

  • Upgrade: PI 7.0 to PI 7.1

    Hi Gurus, We are running with PI 7.0 on Windows 2003 along with MS SQL Server 2005, now are planning to upgrade to PI 7.1 on both MS Windows 2003 & MS SQL Server 2005. I request you all to help me with any good reference Upgrade document and referenc

  • Idocs Performance

    Hi, I have idocs with more segments"large size", the performance was affected , could you tell me witch parameters I must change or what I can do for change  the performance? Regards                        Adam

  • Correct smtp settings not sending

    Having entered the correct pop and smtp settings into my IPad , mail can only be received not sent? Any ideas?

  • Loading ICT data with YTD

    Hi, Can any one advise on this. Can we load ICT data with YTD values. We have data for June and December, when we load data for december it is picking up junes data for YTD at December. for example I have ICT for June = 5000 at December I want load d