i have a query returning user actions with action date , howeever , I want my query to return all the actions with their dates but return null for the action date when the date equals the previous date , for example
action date
gone shopping 10/1/2011
swimming 10/1/2011
riding 11/1/2011
so i want my select to return rows like this
action date
gone shopping 10/1/2011
swimming NULL
riding 11/1/2011
anyone has an idea to implement this?
This sounds like a situation where you would want this aesthetic logic handled in the application layer, not the database layer.
It could cause issues if you change the order of records, or something downstream adds additional logic like a
GROUP BY.It is generally a bad idea to remove data without a reason. You will be effectively uncoupling the
actionfrom thedatefor any other process that consumes your data downstream.