Results 1 to 2 of 2

Thread: Doubts ...

  1. #1
    Join Date
    May 2002
    Posts
    30

    Question Unanswered: Doubts ...

    (1) I have two date fields,startdate and enddate in a table. The next row I insert into the table should have the startdate's value one day more than the previous enddate. how do I accompolish this?

    (2) how do i get a check constraint working on a user-defined data type money. UDT money has a base datatype decimal(10,2)

    Thanks in advance for your suggestions.

  2. #2
    Join Date
    Apr 2002
    Posts
    18
    You can set the date similarly to below.

    db2 => select max(update_date) from mytable

    1
    ----------
    21/05/2002

    1 record(s) selected.

    db2 => select max(update_date) + 1 days from mytable

    1
    ----------
    22/05/2002

    1 record(s) selected.

    db2 =>


    Stick something similar to this on your insert statement.

Posting Permissions

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