I am not able to perform variable declarations, nor use any functions within SQL Commander Lite.
I don't think that variables are supported. Functions are supported, but GETDATE is not a function in PI OLEDB Provider. If you want the current time, use '*' as your end time. The user guide for PI OLEDB Provider can give you more guidance on what you can and cannot do. All of the downloads for PI OLEDB Provider can be found here under "PI System Access - Client".
You must keep in mind that using PI SQL Commander you won't find all the same functions and functionalities we have in MSSMS.
You're probably facing a syntax issue. Please try the code below:
if you really need to use temporary variables you should try to create an auxiliary table (not recommended)
PI OLEDB Provider is in accordance of ANSI SQL 92 Entry-level standard. And getdate() isn't simply one of them. Please see below for the supported function list:
PI OLEDB Provider - Date/Time functions
As Pedro Barroso showed above, we have a much easier method to get datetimes.
Retrieving data ...