dbTalk Databases Forums  

Newbie: 'identifier must be declared' when deleting from table

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Newbie: 'identifier must be declared' when deleting from table in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
andrewst
 
Posts: n/a

Default Re: Newbie: 'identifier must be declared' when deleting from table - 07-17-2003 , 06:20 AM







Originally posted by Ian McCall
Quote:
"Jim Kennedy" wrote in
message news:rpoRa.79756$ye4.58653@sccrnsc01"]news:rpoRa.79756$-
ye4.58653@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.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.