Re: OOP/OOD Philosophy
- From: "Alvin Ryder" <alvin321@xxxxxxxxxxx>
- Date: 11 Jul 2005 16:37:59 -0700
frebe wrote:
> > Because if you don't Oracle will print something you don't want to see.
> The database should not print anything at all. Your application should
> print it.
>
> > TO_DATE and TO_CHAR are very important in Oracle, yet I've never seen
> > them in any other Standard SQL database.
> You shouldn't use to_date and to_char. Retrieve the dates as date
> objects from the result set.
Forget printing dates.
In many databases you can say
SELECT * FROM Blah WHERE someDate='2005-10-23'
They match that day's records by ignoring the time/millisecond part.
But in Oracle you need
SELECT * FROM Blah WHERE someDate=TO_DATE('yyyy-mm-dd','2005-10-23')
Or it will NOT ignore the time part and you probably won't retrieve any
records. You need TO_DATE to ignore the time part.
Use prepared statements ...WHERE someDate=? and it will behave
differently yet again ...
Obviously I'm no big believer of Standard SQL.
frebe, I've read everything you wrote but I'm sorry I think this
discussion can end now.
Cheers.
.
- Follow-Ups:
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- References:
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Phlip
- Re: OOP/OOD Philosophy
- From: Michael Feathers
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Phlip
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Phlip
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Alvin Ryder
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Alvin Ryder
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Alvin Ryder
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Alvin Ryder
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- Prev by Date: Re: Design problem
- Next by Date: Re: OOP/OOD Philosophy
- Previous by thread: Re: OOP/OOD Philosophy
- Next by thread: Re: OOP/OOD Philosophy
- Index(es):
Relevant Pages
|