Desktop productivity for business analysts and programmers

EG 4.2 and Parameter Type

Reply
N/A
Posts: 0

EG 4.2 and Parameter Type

Hello All,
I am running into a strange issue. I have a query in EG using parameters for the start and end date. I have set up the prompts using the prompt manager. Here is the code of the query

PROC SQL;
CREATE TABLE WORK.QUERY_FOR_STUDENT_INCIDENT_FACT AS
SELECT DISTINCT t4.SCHOOL_LONG_NM AS INCIDENT_SCHOOL,
t4.SCHOOL_SHORT_NM AS INCIDENT_SCHOOL_SHORT_NM,
t2.STUDENT_ID,
t2.FIRST_NM,
t2.LAST_NM,
t2.CURRENT_GRADE,
t2.GENDER_DESC,
t2.ETHNICITY_DESC_1,
/* Incident_Date */
(datepart(t5.CALENDAR_DATE)) FORMAT=MMDDYYS8. AS Incident_Date,
t3.INCIDENT_TYPE_DESC,
t3.REPORTED_BY_NM,
t3.ACTION_TAKEN_DESC,
t1.LENGTH_AMT
FROM CURRENT.STUDENT_INCIDENT_FACT AS t1, CURRENT.STUDENT_DIM AS t2, CURRENT.STUDENT_INCIDENT_DIM AS t3,
CURRENT.SCHOOL_DIM AS t4, CURRENT.DATE_DIM AS t5, CURRENT.YEAR_DIM AS t6
WHERE (t1.STUDENT_SK = t2.STUDENT_SK AND t1.STUDENT_INCIDENT_SK = t3.STUDENT_INCIDENT_SK AND t1.SCHOOL_SK =
t4.SCHOOL_SK AND t1.INCIDENT_DATE_SK = t5.DATE_SK AND t5.YEAR_RANGE = t6.YEAR_RANGE) AND
(t6.CURRENT_YEAR_FLG = 'Y' AND ( %_eg_WhereParam( (CALCULATED Incident_Date), Start_Date, GE, TYPE=S ) AND
%_eg_WhereParam( (CALCULATED Incident_Date), End_Date, LE, TYPE=S ) ))
ORDER BY t4.SCHOOL_LONG_NM, t2.CURRENT_GRADE, t2.STUDENT_ID, Incident_Date;
QUIT;

For some reason, every time I save the project and reopen it the type in the above statement changes to D

%_eg_WhereParam( (CALCULATED Incident_Date), End_Date, LE, TYPE=S )
The way I have to fix it is modify the query and go to Filter Data and open this filter, it automatically fixes the type.

Anyone has any idea why I the type keeps going back. I want to send this project to our users (they have EG) and hape them open the project and run it, so it prompts them for the date and they can get the results for the date range specified.

Thank You
Shri
Ask a Question
Discussion stats
  • 0 replies
  • 143 views
  • 0 likes
  • 1 in conversation