<?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 do I include dataset options with a reference to a view created in PROC SQL without an error? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-include-dataset-options-with-a-reference-to-a-view/m-p/722726#M224143</link>
    <description>&lt;P&gt;I get an error when referencing an SQL view with dataset options in and SQL query;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;27 proc sql;&lt;BR /&gt;28 create table test2 as&lt;BR /&gt;29 select *&lt;BR /&gt;30 from test_vw (where = (valid_date&lt;BR /&gt;SYMBOLGEN: Macro variable ASATDATE resolves to 22339&lt;BR /&gt;30 ! = &amp;amp;asatdate.))&lt;BR /&gt;31 ;&lt;BR /&gt;ERROR: Unable to process SAS data set options for SQL view WORK.TEST_VW.&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;32 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I create the view in a data step I do not get an error however it is 10 times slower as it can not exploit indexes. Also if I reference the view with dataset options in a data step there is no error.&amp;nbsp; However I was planning on replacing many very large SAS tables with SAS views without changing numerous SAS programs in production.&amp;nbsp; Many programs currently reference these tables in SQL queries with dataset options.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Does any one know how to resolve this issue in the SAS view?&amp;nbsp; Resolving the issue in the SAS programs using the views is not an option as that would require changes to numerous programs.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Mar 2021 22:27:45 GMT</pubDate>
    <dc:creator>cbsmith_aus</dc:creator>
    <dc:date>2021-03-01T22:27:45Z</dc:date>
    <item>
      <title>How do I include dataset options with a reference to a view created in PROC SQL without an error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-include-dataset-options-with-a-reference-to-a-view/m-p/722726#M224143</link>
      <description>&lt;P&gt;I get an error when referencing an SQL view with dataset options in and SQL query;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;27 proc sql;&lt;BR /&gt;28 create table test2 as&lt;BR /&gt;29 select *&lt;BR /&gt;30 from test_vw (where = (valid_date&lt;BR /&gt;SYMBOLGEN: Macro variable ASATDATE resolves to 22339&lt;BR /&gt;30 ! = &amp;amp;asatdate.))&lt;BR /&gt;31 ;&lt;BR /&gt;ERROR: Unable to process SAS data set options for SQL view WORK.TEST_VW.&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;32 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I create the view in a data step I do not get an error however it is 10 times slower as it can not exploit indexes. Also if I reference the view with dataset options in a data step there is no error.&amp;nbsp; However I was planning on replacing many very large SAS tables with SAS views without changing numerous SAS programs in production.&amp;nbsp; Many programs currently reference these tables in SQL queries with dataset options.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Does any one know how to resolve this issue in the SAS view?&amp;nbsp; Resolving the issue in the SAS programs using the views is not an option as that would require changes to numerous programs.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 22:27:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-include-dataset-options-with-a-reference-to-a-view/m-p/722726#M224143</guid>
      <dc:creator>cbsmith_aus</dc:creator>
      <dc:date>2021-03-01T22:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I include dataset options with a reference to a view created in PROC SQL without an error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-include-dataset-options-with-a-reference-to-a-view/m-p/722731#M224147</link>
      <description>&lt;P&gt;Why not use the WHERE clause directly?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table test2 as
  select *
  from test_vw
 where valid_date = &amp;amp;asatdate.
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Mar 2021 22:40:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-include-dataset-options-with-a-reference-to-a-view/m-p/722731#M224147</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-03-01T22:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I include dataset options with a reference to a view created in PROC SQL without an error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-include-dataset-options-with-a-reference-to-a-view/m-p/722757#M224156</link>
      <description>&lt;P&gt;As far as I know, that's the limitations you have to live with:&lt;/P&gt;
&lt;P&gt;SQL views can use indexes but not DS options.&lt;/P&gt;
&lt;P&gt;DS views can do the opposite.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have no idea why, and that's clearly an odd set of limitations for both types of views.&lt;/P&gt;
&lt;P&gt;I'd raise it with Tech Support just in the hope they can improve this in the future, but don't hold your breath.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 01:43:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-include-dataset-options-with-a-reference-to-a-view/m-p/722757#M224156</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-03-02T01:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I include dataset options with a reference to a view created in PROC SQL without an error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-include-dataset-options-with-a-reference-to-a-view/m-p/722800#M224180</link>
      <description>&lt;P&gt;As I mentioned previously, I am replacing very large SAS tables with SAS views to reduce unsustainable space usage. &amp;nbsp;These table are referenced with dataset options in hundreds of SAS programs across a large financial services institution. &amp;nbsp;If I use SQL views (which are faster than data step views) these programs will fail with this error. &amp;nbsp;Changing hundreds of production and ad-hoc SAS programs is not an option. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I need a solution with the SAS SQL view or I will have to use Data step views which can be much slower as they do not exploit indexes. &amp;nbsp;I have also asked SAS Tech Support. Still waiting for a response.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 07:56:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-include-dataset-options-with-a-reference-to-a-view/m-p/722800#M224180</guid>
      <dc:creator>cbsmith_aus</dc:creator>
      <dc:date>2021-03-02T07:56:21Z</dc:date>
    </item>
  </channel>
</rss>

