Re: Is there a column-data-type restricted to truncated date format?

From: <BoyerG_at_BOS001428.i-did-not-set--mail-host-address--so-tickle-me>
Date: Mon, 12 Apr 2010 20:48:28 -0400
Message-ID: <14qfx3089er.fsf_at_BOS001428.i-did-not-set--mail-host-address--so-tickle-me>



Norbert Winkler <norbert.winkler1_at_gmx.de> writes:

> Hi,
>
> for creating a unique index with a date-column A_DATE I'm using a
> calculated column X_DATE as (trunc(A_DATE)):
>
> CREATE UNIQUE INDEX UX_A_TABLE
> ON A_TABLE (
> ...,
> X_DATE
> )
> /

No. I guess you could create a table of dates, maybe call it day, and then make its PK the date truncated. Pre-populate it with the days that can happen, and then make your "day" columns children of that domain set.

> Using A_DATE in UX_A_TABLE would fail if someone would use sysdate two
> times a day.
> Is there a column-data-type restricted to truncated date format?

Don't understand how having the datatype would solve this issue.

-- 
Galen Boyer

--- news://freenews.netfront.net/ - complaints: news_at_netfront.net ---
Received on Mon Apr 12 2010 - 19:48:28 CDT

Original text of this message