RE: Using q() to define a query
- From: scarville@xxxxxxxxxx (Stephen Carville)
- Date: Mon, 14 Jan 2008 13:44:40 -0500
-----Original Message-----a
From: Peter J. Holzer [mailto:hjp@xxxxxxxxx]
Sent: Monday, January 14, 2008 1:40 AM
To: dbi-users@xxxxxxxx
Subject: Re: Using q() to define a query
On 2008-01-12 11:54:03 +0100, Dr.Ruud wrote:
"Carville, Stephen" schreef:
and c.certcrtdate >= to_date('%s','MM-DD-YYYY')
Aaargh, you should always use 'YYYY-MM-DD'.
While I prefer YYYY-MM-DD, too (and where is MM-DD-YYYY used, anyway?
Isn't that usually written as MM/DD/YYYY or MM.DD.YYYY?), it doesn't
make a difference here: The string is converted to a date type, and
then two date values are compared. That one of them was computed from
string is irrelevant.
That was a legacy format I inherited from the previous web report
writer. He wrote everything as JSP's and apparently someone had taught
him that MM-DD-YYYY was the proper format for dates in Oracle.
Consequently all his SQL and all his web forms used it. I inherited it.
--
Stephen Carville <stephen@xxxxxxxxxxxxxx>
Systems Engineer
Land America
1.626.667.1450 X1326
#####################################################################
Dulce et decorum est pro patria mori.
Si alius est effectus is.
.
- References:
- Using q() to define a query
- From: Colin Wetherbee
- Re: Using q() to define a query
- From: John Scoles
- RE: Using q() to define a query
- From: Stephen Carville
- Re: Using q() to define a query
- From: Dr.Ruud
- Re: Using q() to define a query
- From: Peter J. Holzer
- Using q() to define a query
- Prev by Date: Re: Using q() to define a query
- Next by Date: Re: Using q() to define a query
- Previous by thread: Re: Using q() to define a query
- Next by thread: RE: Using q() to define a query
- Index(es):