Hi,
I'm creating a DDL view and would like to add a dynamic parameter in my where clause:
I found following statement on the net:
VIEW MyView AS SELECT FROM Employee
{
orgUnit,
count(id) AS headCount,
sum(salary) AS totalSalary,
max(salary) AS maxSalary
} GROUP BY orgUnit
WHERE joinDate > date'2011-01-01';
my goal is to get the current_date and add it somehow in the above view like this:
VIEW MyView AS SELECT FROM Employee
{
orgUnit,
count(id) AS headCount,
sum(salary) AS totalSalary,
max(salary) AS maxSalary
} GROUP BY orgUnit
WHERE joinDate > date = current_date;
can this be achieved?
in general: what is the statement to create a dynamic where clause?
thank you,
Maggie