<?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: Help with merging two variable in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-merging-two-variable/m-p/72299#M20946</link>
    <description>Hi Brad...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
u can go like this way also....&lt;BR /&gt;
&lt;BR /&gt;
data columbia(drop=ustreet1 ustreet2);&lt;BR /&gt;
input ustreet1 ustreet2;&lt;BR /&gt;
intersection=compress(cats(ustreet1,ustreet2));&lt;BR /&gt;
cards;&lt;BR /&gt;
123 235&lt;BR /&gt;
564 562&lt;BR /&gt;
235 562&lt;BR /&gt;
;&lt;BR /&gt;
proc print;&lt;BR /&gt;
run;</description>
    <pubDate>Wed, 04 Feb 2009 07:03:27 GMT</pubDate>
    <dc:creator>venkatesh</dc:creator>
    <dc:date>2009-02-04T07:03:27Z</dc:date>
    <item>
      <title>Help with merging two variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-merging-two-variable/m-p/72297#M20944</link>
      <description>Hi.&lt;BR /&gt;
I am trying to create a variable called "&lt;B&gt;intersection&lt;/B&gt;". I would like to put two variables together to form this new variable. My variables I am looking at are "&lt;B&gt;ustreet1&lt;/B&gt;" (aka street 1) and "&lt;B&gt;ustreet2&lt;/B&gt;" (aka the other street in the intersection, or street 2). I would like to use proc sql to create the variable. Here is the code that I thought would work:&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table Columbia2 as&lt;BR /&gt;
select distinct *, &lt;B&gt;ustreet1&lt;/B&gt;||"_"||&lt;B&gt;ustreet2&lt;/B&gt; as &lt;B&gt;intersection&lt;/B&gt; &lt;BR /&gt;
from columbia;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
I have tried this numerous different ways and only get the value from "ustreet1" in the new variable "intersection". How might I go about combining these two variable into a new one. I am sure that the code I posted is almost the right way to go about it, but I think there is something wrong with the code. Any help is greatly appreciated.&lt;BR /&gt;
Thanks&lt;BR /&gt;
B

Message was edited by: Brad151</description>
      <pubDate>Tue, 03 Feb 2009 20:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-merging-two-variable/m-p/72297#M20944</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-03T20:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with merging two variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-merging-two-variable/m-p/72298#M20945</link>
      <description>figured it out</description>
      <pubDate>Tue, 03 Feb 2009 20:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-merging-two-variable/m-p/72298#M20945</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-03T20:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with merging two variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-merging-two-variable/m-p/72299#M20946</link>
      <description>Hi Brad...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
u can go like this way also....&lt;BR /&gt;
&lt;BR /&gt;
data columbia(drop=ustreet1 ustreet2);&lt;BR /&gt;
input ustreet1 ustreet2;&lt;BR /&gt;
intersection=compress(cats(ustreet1,ustreet2));&lt;BR /&gt;
cards;&lt;BR /&gt;
123 235&lt;BR /&gt;
564 562&lt;BR /&gt;
235 562&lt;BR /&gt;
;&lt;BR /&gt;
proc print;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 04 Feb 2009 07:03:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-merging-two-variable/m-p/72299#M20946</guid>
      <dc:creator>venkatesh</dc:creator>
      <dc:date>2009-02-04T07:03:27Z</dc:date>
    </item>
  </channel>
</rss>

