Re: OOP/OOD Philosophy



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.

.



Relevant Pages

  • Read from database, write to another database, simultaneously
    ... I am working on a simple script to read from one database (oracle) and ... chunks and drop the data to postgresql continuously. ... of the python database clients mentioned that using one thread to ... retrieve the data from the oracle database and another to insert the ...
    (comp.lang.python)
  • Re: Limiting Large Result Sets
    ... Oracle 9i - Database ... Windows XP - OS ... I want to retrieve about 30 rows at a time. ...
    (comp.lang.java.databases)
  • Re: Limiting Large Result Sets
    ... Oracle 9i - Database ... Windows XP - OS ... I want to retrieve about 30 rows at a time. ...
    (comp.lang.java.programmer)
  • Issue with references and array slice with one member !
    ... Recently I faced one scenario with references and array slice in perl. ... I used following program to retrieve the rows from a table in Oracle using ... Connect to the database and return a database handle ...
    (perl.beginners)
  • System.Data.OleDb Oracle Ref Cursor into Dataset
    ... C#) on how to retrieve a out ref cursor from an Oracle 8 database to an ...
    (microsoft.public.dotnet.framework.adonet)