Hello
Can someone please tell me how to add a date range to dbquery. I wish the time range of the image (text boxes in the edit Search, Reports, and alerts) as shown in the image.
I assume this is $job.earliestTime$ and $job.latestTime$
What I want is something like
| dbquery MyDatabase "SELECT DISTINCT TOP 10 * FROM V_MyView MyDate BETWEEN " + $job.earliestTime$ + " and " + $job.latestTime$
Basically, return everything in a date range as my view is too big and I only need the range that is selected.
But I keep getting the error command="dbquery", A database error occurred: Invalid SQL statement or JDBC escape, terminating ''' not found.
I also tried things like
| dbquery MyDatabase "SELECT DISTINCT TOP 10 * FROM V_MyView MyDate BETWEEN " . $job.earliestTime$ . " and " . $job.latestTime$
dbquery must be the first command so I cannot use anything like eval 😞
I'm sure I cant be the first person to have this issue.
Please help.
... View more