Re: DATE_FORMAT not working with connector/j 3.1.7
Posted by: R Fields
Date: March 16, 2005 04:26PM

> Richard, without seeing the query and the DDL of
> the table(s) involved, this code isn't much help.
>
> This is really unfortunately a server bug that the
> driver has to work-around, so not all cases are
> currently caught.
>
> -Mark


Hi Mark,

I understand, and appreciate your assistance.

The query is:

select DATE_FORMAT(account_creation_date, '%Y-%m-%d') as date, count(*) as count from customer where customer_deleted_flag = ? and affiliate_company_id = ? and account_creation_date >= ? and account_creation_date <= ? group by date

This parameters to the prepared statement are:
params: [0, FRL, 2005-01-16 00:00:00.428, 2005-03-16 23:59:59.428]


The customer table is defined as (though I pulled out the columns not associated with the query):

CREATE TABLE `customer` (
`CUSTOMER_ID` int(18) NOT NULL auto_increment,
`ACCOUNT_CREATION_DATE` datetime NOT NULL default '0000-00-00 00:00:00',
`AFFILIATE_COMPANY_ID` varchar(50) default NULL,
`CUSTOMER_DELETED_FLAG` int(18) NOT NULL default '0',
PRIMARY KEY (`CUSTOMER_ID`)

) ENGINE=InnoDB


Thanks again,
-Richard

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.