<?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 New SQL Data Source with hyphens in variable names ie LETTER-REF-NUM in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872678#M344766</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a new sql server table data source that I need to query but several of the variables have hyphens in the variable names.&lt;/P&gt;
&lt;P&gt;I am using a SAS pass through query to access the SQL Server database/view.&lt;/P&gt;
&lt;P&gt;How do I get SAS to accept the non standard names?&amp;nbsp; I plan on renaming to change the hyphen to an underscore but right now I cannot even read them in.&lt;/P&gt;
&lt;P&gt;Any assistance will be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;</description>
    <pubDate>Thu, 27 Apr 2023 20:39:27 GMT</pubDate>
    <dc:creator>Elliott</dc:creator>
    <dc:date>2023-04-27T20:39:27Z</dc:date>
    <item>
      <title>New SQL Data Source with hyphens in variable names ie LETTER-REF-NUM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872678#M344766</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a new sql server table data source that I need to query but several of the variables have hyphens in the variable names.&lt;/P&gt;
&lt;P&gt;I am using a SAS pass through query to access the SQL Server database/view.&lt;/P&gt;
&lt;P&gt;How do I get SAS to accept the non standard names?&amp;nbsp; I plan on renaming to change the hyphen to an underscore but right now I cannot even read them in.&lt;/P&gt;
&lt;P&gt;Any assistance will be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 20:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872678#M344766</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2023-04-27T20:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: New SQL Data Source with hyphens in variable names ie LETTER-REF-NUM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872684#M344767</link>
      <description>&lt;P&gt;If you use this option SAS will automatically change the column names from hyphens to underscores when reading these tables:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname = V7;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need to refer to the original names in code then do this 'LETTER-REF-NUM'n&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 20:50:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872684#M344767</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-04-27T20:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: New SQL Data Source with hyphens in variable names ie LETTER-REF-NUM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872699#M344773</link>
      <description>&lt;P&gt;I have tried&amp;nbsp;options validvarname = V7; and&amp;nbsp;options validvarname = any; neither work, still erroring with not valid SAS name.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 21:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872699#M344773</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2023-04-27T21:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: New SQL Data Source with hyphens in variable names ie LETTER-REF-NUM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872701#M344774</link>
      <description>If you're using SQL passthru rename them when you pull them to valid SAS names. &lt;BR /&gt;&lt;BR /&gt;Ie for Oracle&lt;BR /&gt;&lt;BR /&gt;Select "First Name" as first_name, &lt;BR /&gt;            .....&lt;BR /&gt;           from customers;&lt;BR /&gt;quit;</description>
      <pubDate>Thu, 27 Apr 2023 22:02:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872701#M344774</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-27T22:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: New SQL Data Source with hyphens in variable names ie LETTER-REF-NUM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872703#M344775</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17300"&gt;@Elliott&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have tried&amp;nbsp;options validvarname = V7; and&amp;nbsp;options validvarname = any; neither work, still erroring with not valid SAS name.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This should work. Please provide the code and log where you still encounter errors.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_038/acreldb/p1eaghpvezfmohn10fc9whq2pd8m.htm" target="_self"&gt;Options That Affect SAS/ACCESS Naming Behavior&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 22:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872703#M344775</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-04-27T22:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: New SQL Data Source with hyphens in variable names ie LETTER-REF-NUM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872710#M344779</link>
      <description>&lt;P&gt;I was able to read in the data using "LETTER-REF-NUM"n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks All for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 22:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/New-SQL-Data-Source-with-hyphens-in-variable-names-ie-LETTER-REF/m-p/872710#M344779</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2023-04-27T22:51:11Z</dc:date>
    </item>
  </channel>
</rss>

