troubleshooting Question

Set startDate to row above's time based on case statement

Avatar of portlight
portlightFlag for United States of America asked on
MySQL Server
5 Comments1 Solution363 ViewsLast Modified:
I am trying to check to see if the value for column 'complete' of is less than the startDate and if it is then I need to set the startDate to that value so the row is included in the return set....

In looking at the data set here:

Table and code testing

I have several things not working as I would like

1. row 12 isError should = 1 as row 12 and row 13 are both actiivtyID 1257

2. if row 10 is the FIRST row returned in a select statement (using a where date between start and end) I need to set the start date to row 10's completed value
Database Support
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros