Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie: 'identifier must be declared' when deleting from table
Originally posted by Ian McCall
> "Jim Kennedy" wrote in
> message news:rpoRa.79756$ye4.58653_at_sccrnsc01"]news:rpoRa.79756$-
> ye4.58653_at_sccrnsc01[/url]...
> > Additionally,Why are you converting a date to a string and then
> comparing
> it
> > to a field that in all likelyhood is a date?
>
> The field is an existing table, and is a varchar(8). It forms
> part of a
> primary key, which is why dates were avoided (don't want to
> accidently add
> timing resolution beyond that of one day).
>
>
> Cheers,
> Ian
Still use a DATE. You could either use a check constraint to ensure
time is 00:00:00 or a before insert/update trigger to TRUNC new values.
Actually, I've always wished Oracle supported defining a precision for DATE columns, or had a subtype called DATEONLY or similar - analagous to INTEGER. That would solve a lot of bugs cause by inserting SYSDATE untruncated into the database and then querying where datecol = :date_without_time (not that *I* create such bugs of course!)
-- Posted via http://dbforums.comReceived on Thu Jul 17 2003 - 06:20:58 CDT
![]() |
![]() |