I am very new to using SQL. I am trying to extract data from the Micros 3700 database and am doing this successfully on interactive SQL. However, I am struggling to further specify the date. I want to have the latest day figures only. Preferably the same day.
I am using the following
SELECT *
FROM "micros"."v_R_sys_time_period"
to extract from the database. Is there a way to state which day I want displayed? Preferably the latest date.
Sorry, I thought MICROS was an Oracle-related dbms and so would accept truncate.
Get rid of the TRUNC() and see what you get, although that may include the current time as well, which would ruin the results.
The key thing is to use a WHERE clause and to get the current date only, without the time, from some type of system variable and perhaps a function to strip the time.