Subject | Re: [ib-support] Date in SQL |
---|---|
Author | Steve Summers |
Post date | 2003-05-19T20:02:28Z |
""Andrew Neillans"" <andy@...> wrote in message
news:babb03+sc7l@......
downloadable from IBPhoenix.com). Under the topic fro Cast() it says:
Example In the following WHERE clause, CAST() is used to translate a
CHARACTER datatype, INTERVIEW_DATE, to a DATE datatype to compare against a
DATE datatype, HIRE_DATE:
. . .
WHERE HIRE_DATE = CAST (INTERVIEW_DATE AS DATE);
To cast a VARCHAR datatype, you must specify the length of the string, for
example:
UPDATE client SET charef = CAST (clientref AS VARCHAR(20));
Hope that helps.
news:babb03+sc7l@......
> Hi,Don't panic- See the Interbase 6.0 language reference (IB6LangRef.pdf,
> ...
> 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).
downloadable from IBPhoenix.com). Under the topic fro Cast() it says:
Example In the following WHERE clause, CAST() is used to translate a
CHARACTER datatype, INTERVIEW_DATE, to a DATE datatype to compare against a
DATE datatype, HIRE_DATE:
. . .
WHERE HIRE_DATE = CAST (INTERVIEW_DATE AS DATE);
To cast a VARCHAR datatype, you must specify the length of the string, for
example:
UPDATE client SET charef = CAST (clientref AS VARCHAR(20));
Hope that helps.