<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error with &amp;quot;WHERE %_eg_WhereParam&amp;quot; in STP multiple value prompt with dynamic selection in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58958#M12788</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Duh ... I just thought of it ... it's looking for Date and not datetime I bet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try extracting the date using datepart().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some thing like this ... you can fill in the correct syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where datepart(date) between &amp;amp;date_min. and &amp;amp;date_max&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Dec 2011 22:39:02 GMT</pubDate>
    <dc:creator>TriciaA</dc:creator>
    <dc:date>2011-12-02T22:39:02Z</dc:date>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58945#M12775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to build a stored process with a "Multiple value" dynamic selection for the Date field(which was initially in Datatime20. format). Prompt is picking this date column as "Date" in prompt manager and as type "Timestamp" in Info Map Studio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am recieving the following error:&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create table temp as select distinct colA, colB, date, sum(colD), sum(colE) from &lt;/P&gt;&lt;P&gt;libref.dataset WHERE %_eg_WhereParam( DATE, Date, IN, TYPE=D)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;200&lt;/P&gt;&lt;P&gt;WARNING: Apparent invocation of macro _EG_WHEREPARAM not resolved.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, (, +, -, BTRIM, CALCULATED, CASE, EXISTS, INPUT, &lt;/P&gt;&lt;P&gt;The SAS System&lt;/P&gt;&lt;P&gt;NOT, PUT, SUBSTRING, TRANSLATE, USER, ^, ~. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later I have to group it by colA and colB as well. But I am stuck with this error. I have tried to google it out, but all in vain. Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I am working on SAS EG 4.2. and later I want to use this stored process in BI Dashboard 4.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10690i5C0DEDE2560ABF4F/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SAS STP error.png" title="SAS STP error.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 04:40:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58945#M12775</guid>
      <dc:creator>seven_snow</dc:creator>
      <dc:date>2011-12-02T04:40:06Z</dc:date>
    </item>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58946#M12776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Form your log, It looks like SAS can not find macro _EG_WHEREPARAM.&lt;/P&gt;&lt;P&gt;So make sure you have this macro and right name of macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 05:27:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58946#M12776</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-02T05:27:17Z</dc:date>
    </item>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58947#M12777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have better luck the %eg_whereparam when I let SAS EG build the link - using the Query Builder.&amp;nbsp; Then I just copy the code from the Query Builder.&lt;/P&gt;&lt;P&gt;This SAS GloFo paper talks about using the Query Builder and the %eg_whereparam.&amp;nbsp; You may have already seen it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings10/036-2010.pdf"&gt;Interactive and Efficient Macro Programming with Prompts in SAS® Enterprise Guide® 4.2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tricia A&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.bi-notes.com"&gt;SAS BI Blog&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 13:47:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58947#M12777</guid>
      <dc:creator>TriciaA</dc:creator>
      <dc:date>2011-12-02T13:47:45Z</dc:date>
    </item>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58948#M12778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Ksharp!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry, I am pretty new to macros. Could you please tell on how to check if my SAS has this macro?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 18:15:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58948#M12778</guid>
      <dc:creator>seven_snow</dc:creator>
      <dc:date>2011-12-02T18:15:51Z</dc:date>
    </item>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58949#M12779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Tricia!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with Query builder as well and gives me the following error:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ERROR: Invalid date/time/datetime constant ""d.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess its not able to accept the datatype of the "Date" column. I tried with "D" and "DT" , but none of them seems to work. Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYR: &lt;/P&gt;&lt;P&gt;(1) The input data has following characteristics of "Date" column:&lt;/P&gt;&lt;P&gt;Type:Numeric, Length(in bytes):8&lt;/P&gt;&lt;P&gt;Group: Date&lt;/P&gt;&lt;P&gt;Format:DATETIME20.&lt;/P&gt;&lt;P&gt;Informat:DATETIME20. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(2) In Prompt Manager, Date column comes up when I select the prompt type "Date".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 18:24:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58949#M12779</guid>
      <dc:creator>seven_snow</dc:creator>
      <dc:date>2011-12-02T18:24:12Z</dc:date>
    </item>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58950#M12780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just a small question .. are you running your stored process in EG itself... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 20:05:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58950#M12780</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2011-12-02T20:05:22Z</dc:date>
    </item>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58951#M12781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you do a proc contents so I can see the dataset?&amp;nbsp; Tell me which values you are trying to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this blog post - I show how to setup a date range prompt for a stored process - it might shed some light.&amp;nbsp; I didn't use the %eg_whereparam - I just coded it manually.&amp;nbsp; Since I've been coding so long - it's easier for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.bi-notes.com/2011/10/prompts-how-do-i-use-a-date-range-prompt/"&gt;http://www.bi-notes.com/2011/10/prompts-how-do-i-use-a-date-range-prompt/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tricia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 20:16:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58951#M12781</guid>
      <dc:creator>TriciaA</dc:creator>
      <dc:date>2011-12-02T20:16:42Z</dc:date>
    </item>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58952#M12782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; yes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 20:19:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58952#M12782</guid>
      <dc:creator>seven_snow</dc:creator>
      <dc:date>2011-12-02T20:19:54Z</dc:date>
    </item>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58953#M12783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Your note&lt;/P&gt;&lt;P&gt;N&lt;EM&gt;OTE: I am working on SAS EG 4.2. and later I want to use this stored process in BI Dashboard 4.3.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;got me wondering if you were executing your STP on EG or via Information Delivery Portal. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just had a feeling that maybe %_eg_whereparam works only on EG and maynot work when running via portal.. However cannot confirm this as not in front of my application right now..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should look at the notes provided by Tricia.. Which gives you the option for a date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;. However in your code it looks like you are selecting a list of dates hence you can also look at something in the lines of this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;proc sql;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;create table temp as select distinct colA, colB, date, sum(colD), sum(colE) from&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;libref.dataset WHERE&amp;nbsp; DATE in (&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;%if &amp;amp;date_count&amp;nbsp; = 1 %then %do;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;"&amp;amp;date"d&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;%end;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;%else %do i=1 %to &amp;amp;date_count&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;"&amp;amp;&amp;amp;date&amp;amp;i"d&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;%end;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;);&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 20:55:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58953#M12783</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2011-12-02T20:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58954#M12784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your inputs!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your suggested method and the code runs with no errors. But I am not able to see any table created, nor I am able to get it in csv.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;I tried to execute the same in SAS STP as well, but it throws a weird error. I have enclosed the error in the attachment of my first post and I guess now its allowing me t attach it to this post as well.strange!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10735i87460589D092826F/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SAS STP error.png" title="SAS STP error.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 21:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58954#M12784</guid>
      <dc:creator>seven_snow</dc:creator>
      <dc:date>2011-12-02T21:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58955#M12785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks again Tricia. I really appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(1) As mentioned in your blog-post, Its working fine with the date range in proc tabulate. I am not not sure how it would come up, when I try to execute the same in SAS BI dashboard 4.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, to my surprise, when I use proc sql, it throws the following error again:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: teal; font-size: 10pt;"&gt;WARNING: Apparent symbolic reference DATE_MIN not resolved.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: red; font-size: 10pt;"&gt;ERROR: Invalid date/time/datetime constant "&amp;amp;date_min."dt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: teal; font-size: 10pt;"&gt;WARNING: Apparent symbolic reference DATE_MAX not resolved.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: red; font-size: 10pt;"&gt;ERROR: Invalid date/time/datetime constant "&amp;amp;date_max."dt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure how is the Date variable working, because again its not accepting the type"d" and "dt" in the simple where clause as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(2) Do you think, is there a way, where I can specify random date values instead of a continuous date range?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: To your request, PFB the contents of the mentioned dataset:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="351"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" width="61"&gt;Variable&lt;/TD&gt;&lt;TD class="xl66" width="38"&gt;Type&lt;/TD&gt;&lt;TD class="xl65" width="31"&gt;Len&lt;/TD&gt;&lt;TD class="xl66" width="89"&gt;Format&lt;/TD&gt;&lt;TD class="xl66" width="89"&gt;Informat&lt;/TD&gt;&lt;TD class="xl69" width="43"&gt;Label&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="21"&gt;DATE&lt;/TD&gt;&lt;TD class="xl63"&gt;Num&lt;/TD&gt;&lt;TD class="xl67"&gt;8&lt;/TD&gt;&lt;TD class="xl63"&gt;DATETIME20.&lt;/TD&gt;&lt;TD class="xl63"&gt;DATETIME20.&lt;/TD&gt;&lt;TD class="xl64"&gt;DATE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="21"&gt;Col A&lt;/TD&gt;&lt;TD class="xl63"&gt;Char&lt;/TD&gt;&lt;TD class="xl67"&gt;50&lt;/TD&gt;&lt;TD class="xl68"&gt;$50.00 &lt;/TD&gt;&lt;TD class="xl68"&gt;$50.00 &lt;/TD&gt;&lt;TD class="xl63"&gt;Col A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="21"&gt;Col B&lt;/TD&gt;&lt;TD class="xl63"&gt;Char&lt;/TD&gt;&lt;TD class="xl67"&gt;50&lt;/TD&gt;&lt;TD class="xl68"&gt;$50.00 &lt;/TD&gt;&lt;TD class="xl68"&gt;$50.00 &lt;/TD&gt;&lt;TD class="xl63"&gt;Col B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="21"&gt;Col D&lt;/TD&gt;&lt;TD class="xl63"&gt;Num&lt;/TD&gt;&lt;TD class="xl67"&gt;8&lt;/TD&gt;&lt;TD class="xl63"&gt; &lt;/TD&gt;&lt;TD class="xl63"&gt; &lt;/TD&gt;&lt;TD class="xl63"&gt;Col D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="21"&gt;Col E&lt;/TD&gt;&lt;TD class="xl63"&gt;Num&lt;/TD&gt;&lt;TD class="xl67"&gt;8&lt;/TD&gt;&lt;TD class="xl63"&gt;27.1&lt;/TD&gt;&lt;TD class="xl63"&gt;27.1&lt;/TD&gt;&lt;TD class="xl63"&gt;Col E&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 22:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58955#M12785</guid>
      <dc:creator>seven_snow</dc:creator>
      <dc:date>2011-12-02T22:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58956#M12786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like you date is formatted incorrectly ... I would expect it to look like this:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;03NOV10 13:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe some thing is actually wrong with your date variable and that's what is the root of the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 22:26:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58956#M12786</guid>
      <dc:creator>TriciaA</dc:creator>
      <dc:date>2011-12-02T22:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58957#M12787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I replied earlier ... sorry I just saw this post:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the error - I think something is wrong with your date variable.&amp;nbsp; Can you do a proc print and show the first 5 observations?﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 22:31:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58957#M12787</guid>
      <dc:creator>TriciaA</dc:creator>
      <dc:date>2011-12-02T22:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58958#M12788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Duh ... I just thought of it ... it's looking for Date and not datetime I bet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try extracting the date using datepart().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some thing like this ... you can fill in the correct syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where datepart(date) between &amp;amp;date_min. and &amp;amp;date_max&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 22:39:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58958#M12788</guid>
      <dc:creator>TriciaA</dc:creator>
      <dc:date>2011-12-02T22:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58959#M12789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If your objective is to provide a date &amp;amp; time range&amp;nbsp; or value&lt;/P&gt;&lt;P&gt;Then as a sample you can try using the below code in your code section&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro report();&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select count(*) from &lt;/P&gt;&lt;P&gt;sashelp.timedata where datetime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*if using mulitple values&amp;nbsp; then uncomment the below code*/&lt;/P&gt;&lt;P&gt;/* in (*/&lt;/P&gt;&lt;P&gt;/*%if &amp;amp;date_count&amp;nbsp; = 1 %then %do;*/&lt;/P&gt;&lt;P&gt;/*"&amp;amp;date"dt*/&lt;/P&gt;&lt;P&gt;/*%end;*/&lt;/P&gt;&lt;P&gt;/*%else %do i=1 %to &amp;amp;date_count;*/&lt;/P&gt;&lt;P&gt;/*"&amp;amp;&amp;amp;date&amp;amp;i"dt*/&lt;BR /&gt;/*%end;*/&lt;/P&gt;&lt;P&gt;/*);*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*if using using a&amp;nbsp; range then uncomment the below code*/&lt;/P&gt;&lt;P&gt;/*between "&amp;amp;date_min"dt and "&amp;amp;date_max"dt&amp;nbsp; ;*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;%report;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Donot forget to&amp;nbsp; use &lt;STRONG&gt;timestamp&lt;/STRONG&gt; or &lt;STRONG&gt;Timestamp range&lt;/STRONG&gt; as your prompt type... Same should then work.. &lt;/P&gt;&lt;P&gt;Your Prompt Values would look something like&amp;nbsp; January 12, 1998 06:00:00 AM &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Dec 2011 11:15:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58959#M12789</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2011-12-03T11:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58960#M12790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And whether you can use &lt;STRONG&gt;options symbolgen;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;to see what exactly the macro variable &amp;amp;date_min is .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 03:45:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58960#M12790</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-05T03:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58961#M12791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all - for your valuable inputs! My issue is resolved now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whether few things worked or not, I have still learnt from your comments.&lt;/P&gt;&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 16:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58961#M12791</guid>
      <dc:creator>seven_snow</dc:creator>
      <dc:date>2011-12-06T16:31:05Z</dc:date>
    </item>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58962#M12792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; a suggestion,&amp;nbsp; I hope you'll find useful&lt;/P&gt;&lt;P&gt;When filtering a datetime value, don;t convert it to compare against date constants! &lt;/P&gt;&lt;P&gt;Just convert the constants, like:&lt;/P&gt;&lt;P&gt;where datetime_value between "&amp;amp;date1:0:0"dt and "&amp;amp;date2:23:59:59.999"dt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 22:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58962#M12792</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-12-06T22:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58963#M12793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter, thanks for your suggestion, but I am afraid to confess that I did not understand your point. Please elaborate a little.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Understanding:&lt;/P&gt;&lt;P&gt;"datetime_value" is a value selected from the calender that the prompts give in.&lt;/P&gt;&lt;P&gt;"&amp;amp;date1:0:0"dt" is the actual value from the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, &lt;/P&gt;&lt;P&gt;After executing the STP, when I select the value from the prompts' calender option, it displays: "October 01, 2010 11:09:19 AM"--(1)&lt;/P&gt;&lt;P&gt;Value from actual table is displayed as: "01OCT2010:00:00:00"--(2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you want to convey that we should not filter like: datepart(2) = datepart(1) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I did not understand how to convert the constants? -&amp;gt; "&amp;amp;date2:23:59:59.999"dt ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 19:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58963#M12793</guid>
      <dc:creator>seven_snow</dc:creator>
      <dc:date>2011-12-07T19:54:28Z</dc:date>
    </item>
    <item>
      <title>Error with "WHERE %_eg_WhereParam" in STP multiple value prompt with dynamic selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58964#M12794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pardon me if I'm only adding confusion. &lt;/P&gt;&lt;P&gt;I imagined you were comparing&amp;nbsp; data values stored as standard SAS datetime values. There is a datetime constant syntax. Some posters suggest extracting the datepart before comparing a datetime value with a constant date. &lt;/P&gt;&lt;P&gt;From your reply I presume your objective is to compare values as text, so my suggestion is inappropriate. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2011 09:59:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-with-quot-WHERE-eg-WhereParam-quot-in-STP-multiple-value/m-p/58964#M12794</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-12-08T09:59:44Z</dc:date>
    </item>
  </channel>
</rss>

