I have a report that runs every week using a schedule and runs for last week data only. An exapmle of the SQL is:
If I can specify the specific week in the where clause, the performance is improved. The desired SQL would be:
I have tried to create a prompt with a relationship filter so that the list of values is a single week (last week) but there is no way that I know of to have that value automatically defaulted. If I do not select, the scheduled report will fail.
Is there a way to do this? Any help would be greatly appreciated.
Code:
SELECT
WEEK_DIM.WEEK_DESC,
FACT.SALES
FROM
FACT,
WEEK_DIM
WHERE
FACT.WEEK = WEEK_DIM.WEEK
AND WEEK.LAST_WEEK_IND = 1
Code:
CODE
SELECT
WEEK_DIM.WEEK_DESC,
FACT.SALES
FROM
FACT,
WEEK_DIM
WHERE
FACT.WEEK = WEEK_DIM.WEEK
[b]AND FACT.WEEK = 200408[/b]
Is there a way to do this? Any help would be greatly appreciated.