MySQL Forums
Forum List  »  General

Re: Error when writing using date aggregate
Posted by: Peter Brawley
Date: April 28, 2020 12:41PM

> Data truncation: Incorrect datetime value: '0000-00-00 00:00:00'

Indicates zero dates (not null dates) have been inserted.

> ...FROM table1 a
> RIGHT JOIN table2 s2 on a.session_uuid = s2.uuid
> WHERE s2.created_at IS NULL...

This outer joins from s2 to a, ie it sees all rows from s2 and only matching rows from a, so any s2.created nulls it sees are s2 column values. Is that what you intended?

Options: ReplyQuote

Written By
Re: Error when writing using date aggregate
April 28, 2020 12:41PM

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.