<?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 Proc SQL in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL/m-p/365908#M23973</link>
    <description>&lt;P&gt;&lt;STRONG&gt;data ds2d(keep=subjid patnum usubjid);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set ivdata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set dmdata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create table dsdt(keep= usubjid) &amp;nbsp;as select dms.patnum dms.usubjid dms.subjid from ds2d as dms where dms.patnum=input(dms.subjid,8.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where condition doesn't satisfied.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In short, I want to set dsdt.usubjid as ds2d.usubjid where ds2d.patnum(Numeric data type) and ds2d.subjid(character datatype) must be same.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2017 14:35:02 GMT</pubDate>
    <dc:creator>napatel0911</dc:creator>
    <dc:date>2017-06-10T14:35:02Z</dc:date>
    <item>
      <title>Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL/m-p/365908#M23973</link>
      <description>&lt;P&gt;&lt;STRONG&gt;data ds2d(keep=subjid patnum usubjid);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set ivdata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set dmdata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create table dsdt(keep= usubjid) &amp;nbsp;as select dms.patnum dms.usubjid dms.subjid from ds2d as dms where dms.patnum=input(dms.subjid,8.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where condition doesn't satisfied.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In short, I want to set dsdt.usubjid as ds2d.usubjid where ds2d.patnum(Numeric data type) and ds2d.subjid(character datatype) must be same.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2017 14:35:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL/m-p/365908#M23973</guid>
      <dc:creator>napatel0911</dc:creator>
      <dc:date>2017-06-10T14:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL/m-p/365910#M23974</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/141751"&gt;@napatel0911&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;In short, I want to set dsdt.usubjid as ds2d.usubjid where ds2d.patnum(Numeric data type) and ds2d.subjid(character datatype) must be same.&lt;/STRONG&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is what it looks like you are trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
  create table dsdt as
    select usubjid
    from ds2d 
    where patnum = input(subjid,32.)
  ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would describe that as finding the set of USUBJID values for the cases where the numeric PATNUM is the same as the character SUBJID. &amp;nbsp;If that is not what you are trying to do then rephrase the question to make it clearer. Posting sample input and output data will help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are finding that there are no records that match the WHERE condition then you should post some example data that you think SHOULD match and perhaps someone can explain why it doesn't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2017 14:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL/m-p/365910#M23974</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-06-10T14:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL/m-p/366317#M23992</link>
      <description>Hi!! Thank you for your reply. I will post some example also asap..</description>
      <pubDate>Mon, 12 Jun 2017 19:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL/m-p/366317#M23992</guid>
      <dc:creator>napatel0911</dc:creator>
      <dc:date>2017-06-12T19:46:16Z</dc:date>
    </item>
  </channel>
</rss>

