DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: timestamp has no day, how to manipulate?

  1. #1
    Join Date
    Oct 2002
    Posts
    182

    timestamp has no day, how to manipulate?

    Let's assume it is today (July 21) and the time is 00:05 (12:05 AM).
    I receive a file with data I need to load. It comes in 5 minute increments and has a timestamp with no date (this is why I hate this file).

    The data will lok like this:
    Code:
    "D","4006","23:55:02",51.75,0,-1.42,50.33
    "D","4007","23:55:02",51.75,0,0.62,52.37
    "D","4008","23:55:02",51.75,0,-0.76,50.99
    "D","4000","00:00:03",53.75,0,0.23,53.98
    "D","4001","00:00:03",53.75,0,-3.46,50.29
    "D","4002","00:00:03",53.75,0,0.37,54.12
    "D","4008","00:00:03",53.75,0,-0.8,52.95
    "D","4000","00:05:05",53.39,0,0.2,53.59
    "D","4001","00:05:05",53.39,0,-3.25,50.14
    "D","4002","00:05:05",53.39,0,0.37,53.76
    My problem is this:
    Since there is no date, I have to assume it is always 'Today'. Unfortunately, this means that the 11:55 PM data gets loaded as the FUTURE (July 21 11:55 PM) instead of 11:55 PM yesterday (July 20).

    I directly load this into the table with SQL*Loader.

    The only solutions I have so far are:

    1. After the data is loaded, take the dates in the future and load them as date-1

    2. Load data into a temp table, and write some crazy manipulation script for any dates in the future, and then load the data into the actual table.

    Can anyone think of anything else as a solution?

    Thanks for your time (no punn intended).
    - Cookies

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Jeff Hunter

Posting Permissions

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


Click Here to Expand Forum to Full Width