Re: Selecting by date



On Thu, 27 Oct 2005 14:46:02 -0700, Stan wrote:

>I have a table that has the significant date set up as a CHAR datatype with
>length of 8, i.e 20051027. I want to select all transactions where this date
>equals the system date.

Hi Stan,

SELECT ....
FROM ....
WHERE YourDateColumn = CONVERT(char(8), CURRENT_TIMESTAMP, 112)

But why are you storing a date as a CHAR column, instead of using the
datetime datatype?

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)
.