Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello again.
I have a lot of records with dates.
How can I in SQL make a selection in order to get records only with the date of previous month?
For example, now GetDate() = 21.01.2016 ...
So I need all records from December of year 2015.
How to make necessary WHERE selection?
WHERE Record_date.... ???
P.S.: I use MS SQL
Thank you in advance for helping!
It seems like I am a bit late, but this is what I use:
If you use Qlikview function in SQL statement, you will get the message. You should have try exactly what I have suggested. I just created variables above the Sql statement and used the variable names alone in the Sql statement. Anyways, you find the solution.
Thank for your help. I did my sql request already. Very similar way.