Subject | Re: [ib-support] Date in SQL |
---|---|
Author | Thomas Miller |
Post date | 2003-05-19T19:49:12Z |
You are not searching for a date, you are searching for a string. You
have a
string in a string field that looks like a date, maybe. If you want to
do searches
on dates as dates, then you need to have a DATE column or TIMESTAMP
data type column. Good luck!
Andrew Neillans wrote:
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork
http://www.bss-software.com
http://sourceforge.net/projects/dbexpressplus
have a
string in a string field that looks like a date, maybe. If you want to
do searches
on dates as dates, then you need to have a DATE column or TIMESTAMP
data type column. Good luck!
Andrew Neillans wrote:
>Hi,--
>
>Hope this is the right place to ask...
>
>I have been given the task of writing a number of SQL scripts on an
>existing database, but one in particular is causing me grief.
>
>The server is Firebird 1.02 I believe.
>
>I have a table that stores contact details, with the registered date.
>
>e.g.
>
>title varchar(20)
>firstname varchar(255)
>lastname varchar(255)
>address1 varchar(255)
>etc
>registered varchar(20)
>
>I am trying to do a search and,say, list all the people registered
>before 1st Jan 2003, so I tried the following:
>
>SELECT * FROM "contact"
>WHERE "contact"."registered" < '01/01/03'
>
>But this returned some with the year 2003 which is not right (they
>were May 2003 ;)).
>
>Is it possible to do a date search on a varchar, or am I going to
>have to try and find the original source of the application that runs
>this database and change it? (Please dont say this .... :p).
>
>Many thanks in advance!!
>
>Andy
>
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork
http://www.bss-software.com
http://sourceforge.net/projects/dbexpressplus