Subject | Re: [firebird-support] Re: Date problem in Firebird |
---|---|
Author | Martijn Tonies |
Post date | 2005-06-14T06:44:55Z |
> > It's *standard* not to quote date literals? How areNope, doesn't work for me ...
> these "standard"
> > databases going to distinguish your expression from an illegal
> calculation
> > expression?
> >
> > ./hb
>
> SQL Server, Oracle, DB2 and others supports this.
>
> I'm sure that they are evaluating what you are comparing "from" and
> internally cast/promote what you are comparing "to".
>
> So...
> SELECT * FROM myTable WHERE myDateField > 1/1/2004 works in the above
> databases plus a few more that I know of WITHOUT needing to place
> qoutes around them.
Table:
CREATE TABLE dbo.date_test (
d DateTime
)
Data:
INSERT INTO date_test(d) VALUES ('06/14/2005 08:43:37.550');
INSERT INTO date_test(d) VALUES ('06/04/2005 08:43:39.613');
INSERT INTO date_test(d) VALUES ('05/25/2005 08:43:41.677');
This returns all rows:
select * from dbo.date_test
This returns no rows:
select * from dbo.date_test
where d < 6/15/2005
As you can see, all of the above dates are below the 15th. None of them
are returned though.
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com