I was able to duplicate this in eg5.1. I guess that the macro was built with the thought that the user was only applying it when they wanted to use it? If you look at the code construction in the 'Preview' pain, if the eg_whereparam returns no values at all the 'AND <blank>' would also cause the SQL code to fail for other reasons. FROM CANDY.SALESDETAIL2011 t1 WHERE %_eg_WhereParam( t1.Product, product, EQ, TYPE=S, IS_EXPLICIT=0 ) AND %_eg_WhereParam( t1.Date, daterange, BETWEEN, TYPE=D, IS_EXPLICIT=0 ); QUIT; Wondering if you could set up a conditional processing step before this query task to fill with the date prompt values with beginning/end of time dates if nothing is entered. Then in the query task itself, use the &daterange_min and &daterange_max values instead of the _eg_whereparam macro. ~ Angela
... View more