<?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 SAS SQL COlumn name with pipes and apostrophe in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408130#M67105</link>
    <description>&lt;P&gt;ok i know its odd, but i have a field name:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;D.DISPUTE_ID||'0'||R.REASON_NUMB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how do I deal with that in a PROC SQL column name?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2017 18:59:52 GMT</pubDate>
    <dc:creator>StaticFX</dc:creator>
    <dc:date>2017-10-27T18:59:52Z</dc:date>
    <item>
      <title>SAS SQL COlumn name with pipes and apostrophe</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408130#M67105</link>
      <description>&lt;P&gt;ok i know its odd, but i have a field name:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;D.DISPUTE_ID||'0'||R.REASON_NUMB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how do I deal with that in a PROC SQL column name?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 18:59:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408130#M67105</guid>
      <dc:creator>StaticFX</dc:creator>
      <dc:date>2017-10-27T18:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS SQL COlumn name with pipes and apostrophe</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408132#M67106</link>
      <description>&lt;P&gt;I don't know what you mean by this. That looks like the code is concatenating dispute_id from one table (alias d) and reason_numb from another (alias r) with a "0" in the middle. If this is just part of a select statement, I don't know what needs to change (other than possible issues with leading blanks). If it's part of a create table, you'd just want to do "&lt;SPAN&gt;D.DISPUTE_ID||'0'||R.REASON_NUMB AS your_desired_name," for the syntax.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 19:06:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408132#M67106</guid>
      <dc:creator>collinelliot</dc:creator>
      <dc:date>2017-10-27T19:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS SQL COlumn name with pipes and apostrophe</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408133#M67107</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173987"&gt;@StaticFX&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;ok i know its odd, but i have a field name:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;D.DISPUTE_ID||'0'||R.REASON_NUMB&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how do I deal with that in a PROC SQL column name?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Beat up whoever created it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like someone attempted to concatenate some values to create a variable but did it incorrectly, possibly in a macro&lt;/P&gt;
&lt;P&gt;If that is the actual name you should be able to reference it using the name literal syntax: "D.DISPUTE_ID||'0'||R.REASON_NUMB"n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would be very tempted to rename the variable (and fix any process assigning such a name) as typing such a name is asking for syntax errors.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 19:07:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408133#M67107</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-27T19:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS SQL COlumn name with pipes and apostrophe</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408142#M67108</link>
      <description>&lt;P&gt;thats what it is doing in the original query...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but thats the &lt;STRONG&gt;actual&lt;/STRONG&gt; column name now lol..I am afraid to rename the field in the original SQL code that creates the table because the table is used by who knows how many other scripts...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would rename it myself but I cant get it to accept it lol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT ID, [&lt;SPAN&gt;D.DISPUTE_ID||'0'||R.REASON_NUMB], INVOICE_DATE FROM COMBINED;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SELECT ID, "D.DISPUTE_ID||'0'||R.REASON_NUMB", INVOICE_DATE FROM COMBINED;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SELECT ID, `D.DISPUTE_ID||'0'||R.REASON_NUMB`, INVOICE_DATE FROM COMBINED;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;nothing works..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 19:39:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408142#M67108</guid>
      <dc:creator>StaticFX</dc:creator>
      <dc:date>2017-10-27T19:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS SQL COlumn name with pipes and apostrophe</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408143#M67109</link>
      <description>&lt;P&gt;I concur with this: "&lt;SPAN&gt;Beat up whoever created it."&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 19:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408143#M67109</guid>
      <dc:creator>collinelliot</dc:creator>
      <dc:date>2017-10-27T19:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS SQL COlumn name with pipes and apostrophe</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408148#M67111</link>
      <description>&lt;P&gt;ahhh i dint see the n after thank you! that was driving me nuts!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I am renaming it from the query too lol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: im looking for the person who started it! lol&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 19:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408148#M67111</guid>
      <dc:creator>StaticFX</dc:creator>
      <dc:date>2017-10-27T19:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS SQL COlumn name with pipes and apostrophe</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408197#M67113</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173987"&gt;@StaticFX&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;ahhh i dint see the n after thank you! that was driving me nuts!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I am renaming it from the query too lol&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: im looking for the person who started it! lol&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start with the person in your shop refers to "macros" the most.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 23:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-SQL-COlumn-name-with-pipes-and-apostrophe/m-p/408197#M67113</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-27T23:18:46Z</dc:date>
    </item>
  </channel>
</rss>

