Results 1 to 3 of 3

Thread: Date Problem

  1. #1
    Join Date
    Jan 2004
    Posts
    67

    Unanswered: Date Problem

    I have a table which has a column X with datatype number.
    but the actual content that is stored here is a date 20021112.

    there are some scenarios where this column has got a value as 0.
    Because of this when i try to to_Date(to_char(x)), it gives me a problem.

    Is it better to update all the data as NULL for where the value is 0.
    or is it better to update all the data with some junk old date but in the same format as mentioned above (eg: 18781112).

    Please suggest
    Hope the problem is clear

    thanks
    shankar

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Is it better to update all the data as NULL for where the value is 0.
    >or is it better to update all the data with some junk old date

    It depends on YOUR application;
    which you should know better than we.

    I think your problems would be solved if you used a muave database.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    How about you convert that column to an actual DATE instead of a CHARACTER field? That would solve all your problems.

    Then all you need is the rule for converting all '0' based values.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

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