Hello All.
I'm trying to pull the quantity sold from OINV for the past year, and divide it into quarters.
I'm relatively new to SQL, so I'm learning how to use the DateAdd and DateDiff to get this done. From my understanding, in order to find the last quarter, I would use the following command.
Select
DateAdd (qq, DateDiff (qq,0,GetDate()) -1,0)
-- How would I incorporate this syntax to break up all of my sales from last year into quarters? Once I have the proper syntax, I plan on bringing this into crystal as a command.
Thanks in advance.
I'm trying to pull the quantity sold from OINV for the past year, and divide it into quarters.
I'm relatively new to SQL, so I'm learning how to use the DateAdd and DateDiff to get this done. From my understanding, in order to find the last quarter, I would use the following command.
Select
DateAdd (qq, DateDiff (qq,0,GetDate()) -1,0)
-- How would I incorporate this syntax to break up all of my sales from last year into quarters? Once I have the proper syntax, I plan on bringing this into crystal as a command.
Thanks in advance.