<?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: How to work with concatenation pipes &amp;quot;||&amp;quot; in insert statement in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-work-with-concatenation-pipes-quot-quot-in-insert/m-p/166605#M43156</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you for your reply.&amp;nbsp; I was working on a different project so I apologize for my late reply. &lt;/P&gt;&lt;P&gt;I have it working now by doing an insert that only populated the primary key and then did an update to populate the text.&amp;nbsp; &lt;/P&gt;&lt;P&gt;When I get back on the project I plan on looking into your suggestion.&amp;nbsp; I will post back once I do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Feb 2014 16:43:37 GMT</pubDate>
    <dc:creator>jerry898969</dc:creator>
    <dc:date>2014-02-11T16:43:37Z</dc:date>
    <item>
      <title>How to work with concatenation pipes "||" in insert statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-work-with-concatenation-pipes-quot-quot-in-insert/m-p/166602#M43153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an sas file that is being created in a C# application.&amp;nbsp; There is a notes field that users can populate and put carriage returns in.&lt;/P&gt;&lt;P&gt;When I try and run the below insert statement in sas it gives me the below error on the first set of "||"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;proc sql ; &lt;/P&gt;
&lt;P&gt;Insert into Notes (id, text)&lt;/P&gt;
&lt;P&gt;values(1,'test' || '0d0a'x || '' || '0d0a'x || '')&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;quit ; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a missing value, ), +, ',', -, MISSING, NULL, USER.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ERROR 200-322: The s00-322: The symbol is not recognized and will be ignored.s not recognized and will be ignored.&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;If I insert a row into this table with an empty text field then update the field with the same text it works fine.&amp;nbsp; How can I get around this and still get the desired results?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Dec 2013 03:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-work-with-concatenation-pipes-quot-quot-in-insert/m-p/166602#M43153</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2013-12-07T03:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to work with concatenation pipes "||" in insert statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-work-with-concatenation-pipes-quot-quot-in-insert/m-p/166603#M43154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try having the C program concat the values and then emit the string as Hex so that you could generate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;values(1,'746573740D0A200D0A'x)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Dec 2013 15:17:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-work-with-concatenation-pipes-quot-quot-in-insert/m-p/166603#M43154</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-12-07T15:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to work with concatenation pipes "||" in insert statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-work-with-concatenation-pipes-quot-quot-in-insert/m-p/166604#M43155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try using a set statement rather than a values statement?&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data notes;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat text $30.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format text $30.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input id text &amp;amp;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;15 this is a test&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Insert into Notes (id, text)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set id=1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text='test'||'xx'||'0d0a'x||'yy'||'0d0a'x||''&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Dec 2013 15:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-work-with-concatenation-pipes-quot-quot-in-insert/m-p/166604#M43155</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-12-07T15:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to work with concatenation pipes "||" in insert statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-work-with-concatenation-pipes-quot-quot-in-insert/m-p/166605#M43156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you for your reply.&amp;nbsp; I was working on a different project so I apologize for my late reply. &lt;/P&gt;&lt;P&gt;I have it working now by doing an insert that only populated the primary key and then did an update to populate the text.&amp;nbsp; &lt;/P&gt;&lt;P&gt;When I get back on the project I plan on looking into your suggestion.&amp;nbsp; I will post back once I do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 16:43:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-work-with-concatenation-pipes-quot-quot-in-insert/m-p/166605#M43156</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2014-02-11T16:43:37Z</dc:date>
    </item>
  </channel>
</rss>

