Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Posts
    328

    Unanswered: Changing number to date.

    I have a table in SQL Server that has a date field whose properties are 'number'. I want to export this data to a table in Oracle. I can't touch the Server table to alter it to be a date. Is there some way I can do this in the Oracle table? Example- SQL Server= 20030324 (March 24,2003). In Oracle I want it to read '24/03/2003', or some other date format.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    you can make it read however you want in oracle.

    to load it use sqlloader and specify the precision.

    ie: columndate date 'YYYYMMDD'


    once it is in Oracle, you use the to_char function to diplay the date to your preferences
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Aug 2003
    Posts
    328
    I see what you mean. I just wondered if there was a way to do the change in the migration from Server to Oracle. Thanks.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,296
    well, it is all in the display of the date on the oracle side.
    you could set the default nls_date to display the date exactly as you want it as a default.

    So if you select sysdate from dual, the date will display appropriately for your tastes.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  5. #5
    Join Date
    Aug 2003
    Posts
    328
    Thanks

Posting Permissions

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