You can translate the question and the replies:

How do I pull all records from the past two days?

What is the best way to pull all records from the past two days? Here is what I currently have and it does not work: select * from table_1 where creation_date between CURRENT_DATE and Subtract(CURRENT_DATE(), 2)
22-05-2017 17:06:46 -0400

1 Answer

Hello, The use of ‘Subtract’ function is to get the difference between two numeric values. For example, when you run a query with ‘subtract’ function like below: - SELECT subtract(2,1) FROM DUAL(), would give the result as ‘1’. Regarding your question, if I need to query the records between two dates then I would use "addday" function in the VQL query as below: - SELECT * FROM <VIEWNAME> WHERE CREATION_DATE BETWEEN addday(CURRENT_DATE(), -2) and CURRENT_DATE() You can navigate to “Help > Functions list” of the Virtual DataPort Administration tool to know more about different data functions. Hope this helps!!
Denodo Team
23-05-2017 06:39:57 -0400
You must sign in to add an answer. If you do not have an account, you can register here