Traditional web-based reporting with SAS BI tools

Advanced Filter Prompt

Reply
Contributor
Posts: 21

Advanced Filter Prompt

Friends,

I'm trying to make a filter that would be entered at the prompt and then would take the same amount entered at the prompt and would least 365 days worth.


ajuda2.jpg


sql would have to stay that way.


SELECT  DISTINCT

     ( table0.DATA )  AS DIR_2 LABEL='Data' FORMAT=ddmmyy10.

FROM

    D_CORP.DIM_TEMPO table0

WHERE

     ( table0.DATA )  <= (MAX('01Feb2014'd,'28Feb2014'd)) AND

     (  ( table0.DATA )  )  >=  (MAX ('01Feb2014'd,'28Feb2014'd) ) -365

GROUP BY

    1;

but every time I do the filter thereby sql looks like this.

SELECT  DISTINCT

     ( table0.DATA )  AS DIR_2 LABEL='Data' FORMAT=ddmmyy10.

FROM

    D_CORP.DIM_TEMPO table0

WHERE

     ( table0.DATA )  <= (MAX('01Feb2014'd,'28Feb2014'd))

GROUP BY

    1

HAVING

     (  ( table0.DATA )  )  >=  ( (MAX('01Feb2014'd,'28Feb2014'd))-365 ) ;

quit;

Post a Question
Discussion Stats
  • 0 replies
  • 745 views
  • 0 likes
  • 1 in conversation