<?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 How to code for a  prompt that is numeric that if left blank, the select will grab ALL observations. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-code-for-a-prompt-that-is-numeric-that-if-left-blank-the/m-p/249196#M46838</link>
    <description>&lt;P&gt;I am creating a stored process that will have 5 different prompts defined. All are character except for one, ‘DISTRICT’.&amp;nbsp;&amp;nbsp; The user wants to be able to leave the ‘DISTRICT’ column blank and return all the observations, no matter what the numeric value of DISTRICT is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I defined the prompt as a numeric type in SMC but cannot figure out how to handle it in the code/select statement.&amp;nbsp; Basically, it is like a wildcard on a character type column but on a numeric column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is one of my character type prompts. No matter what value is entered, a '%' for wildcard is added.&lt;/P&gt;
&lt;P&gt;call symput("NEW_REGION_CD","'"||"&amp;amp;REGION_CD"||"%'");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can't figure out how to do this same thing for prompt&amp;nbsp;that is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any assistance would be appreciated!!!&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2016 15:05:11 GMT</pubDate>
    <dc:creator>ncsthbell</dc:creator>
    <dc:date>2016-02-10T15:05:11Z</dc:date>
    <item>
      <title>How to code for a  prompt that is numeric that if left blank, the select will grab ALL observations.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-code-for-a-prompt-that-is-numeric-that-if-left-blank-the/m-p/249196#M46838</link>
      <description>&lt;P&gt;I am creating a stored process that will have 5 different prompts defined. All are character except for one, ‘DISTRICT’.&amp;nbsp;&amp;nbsp; The user wants to be able to leave the ‘DISTRICT’ column blank and return all the observations, no matter what the numeric value of DISTRICT is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I defined the prompt as a numeric type in SMC but cannot figure out how to handle it in the code/select statement.&amp;nbsp; Basically, it is like a wildcard on a character type column but on a numeric column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is one of my character type prompts. No matter what value is entered, a '%' for wildcard is added.&lt;/P&gt;
&lt;P&gt;call symput("NEW_REGION_CD","'"||"&amp;amp;REGION_CD"||"%'");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can't figure out how to do this same thing for prompt&amp;nbsp;that is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any assistance would be appreciated!!!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 15:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-code-for-a-prompt-that-is-numeric-that-if-left-blank-the/m-p/249196#M46838</guid>
      <dc:creator>ncsthbell</dc:creator>
      <dc:date>2016-02-10T15:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to code for a  prompt that is numeric that if left blank, the select will grab ALL observati</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-code-for-a-prompt-that-is-numeric-that-if-left-blank-the/m-p/249206#M46843</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There isn't a wild card for numbers though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'd have to provide an example of how this would be used in the queries for us to offer suggestions.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 15:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-code-for-a-prompt-that-is-numeric-that-if-left-blank-the/m-p/249206#M46843</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-10T15:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to code for a  prompt that is numeric that if left blank, the select will grab ALL observati</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-code-for-a-prompt-that-is-numeric-that-if-left-blank-the/m-p/249211#M46844</link>
      <description>&lt;P&gt;Sorry, here is a short example of my code.&amp;nbsp; The first statement on the 'where; clause is the numeric 'DISTRICT' column.&amp;nbsp; All others are character and work.&lt;/P&gt;
&lt;PRE&gt;PROC SQL;
CREATE TABLE WORK.DATA_SELECTED AS 
	(SELECT 
		t1.DISTRICT,
		t1.OFFICE_NAME,
		t1.OFFICE_LOCATION
t1.OFFICE_MANAGER
		t1.NBR_EMPLOYEES,
		t1.COUNTY_NAME, 
		t1.ADDR_LINE_1, 
		t1.ADDR_LINE_1, 
		t1.CITY, 
		t1.STATE, 
		t1.ZIP
	    FROM  mylib.t1 DISTRIC_INFO
	    WHERE t1.District = &amp;amp;NEW_district
and t1.Office_Name LIKE &amp;amp;NEW_OFFICE_NAME
and t1.State = &amp;amp;NEW_STATE
and t1.County_Name = &amp;amp;NEW_COUNTY
and t1.City = &amp;amp;NEW_CITY
and t1.Zip = &amp;amp;NEW_ZIP );
QUIT;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Feb 2016 15:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-code-for-a-prompt-that-is-numeric-that-if-left-blank-the/m-p/249211#M46844</guid>
      <dc:creator>ncsthbell</dc:creator>
      <dc:date>2016-02-10T15:47:07Z</dc:date>
    </item>
  </channel>
</rss>

