NOTE: In order for the SQL to be submitted correctly, there are two scenarios that must be taken into account when entering the text into the string field:
- A WHERE clause exists. The string should be 'AND Year_ID'. The SQL would be generated as follows.
select a11.year_ID,
sum((a11.TOT_DOLLAR_SALES - a11.TOT_COST)) WJXBFS1
from YR_CATEGORY_SLS a11
WHERE YEAR_ID > 1990
AND YEAR_ID in (2000)
group by a11.year_ID
Without the AND in the string column of the security filter, the SQL would appear as shown below and would error out.
select a11.year_ID,
sum((a11.TOT_DOLLAR_SALES - a11.TOT_COST)) WJXBFS1
from YR_CATEGORY_SLS a11
WHERE YEAR_ID > 1990
YEAR_ID in (2000)
group by a11.year_ID
- No WHERE clause exists. The string should be 'WHERE Year_ID'. The SQL would be generated as follows.
select a11.year_ID,
sum((a11.TOT_DOLLAR_SALES - a11.TOT_COST)) WJXBFS1
from YR_CATEGORY_SLS a11
WHERE YEAR_ID in (2000)
group by a11.year_ID
Without the WHERE in the string column of the security filter, the SQL would appear as shown below and would error out.
select a11.year_ID,
sum((a11.TOT_DOLLAR_SALES - a11.TOT_COST)) WJXBFS1
from YR_CATEGORY_SLS a11
YEAR_ID in (2000)
group by a11.year_ID