Good Day Experts!
I am working on a new task that requires working with dates in a SQL query. I have multiple user records for an individual. Those records have an entry date on them. I will take in the passed month from the report tool. For that month, I need to get all the records for each user.
I can think of two ways to approach this. 1) Build into the query a way to identify the numerical range of days in a month for that passed in month from the report. Then go after that range of days, in the date on the record, for the given month grabbing all of the records. 2) Just grab all the records for that user with the passed in month in the month portion of the entry date on the record.
The second one would "assume" that data validation was done on the way in for the date when it was the record was inserted.
What are your thoughts?
If the first one is that way to go, do you know of any references that could help me get started?