<?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: Record count in sas dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65453#M14204</link>
    <description>Thanks Peter. This worked like a charm!</description>
    <pubDate>Tue, 25 Jan 2011 03:08:16 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2011-01-25T03:08:16Z</dc:date>
    <item>
      <title>Record count in sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65449#M14200</link>
      <description>Hi!&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
What I want to do is update the Txt column in a Teardata table with the count from a sas dataset. &lt;BR /&gt;
txt = 'No of apps processed today' || count.&lt;BR /&gt;
How do I get the count , convert it into varchar so that I can concatenate it with the rest of the text and update the table ? &lt;BR /&gt;
&lt;BR /&gt;
UPDATE  table1 &lt;BR /&gt;
(select count(*) cnt  from work.apptable)A;&lt;BR /&gt;
SET TXT = No of apps processed today' || CAST (A.cnt AS VARCHAR 10),&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Mon, 24 Jan 2011 16:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65449#M14200</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-01-24T16:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Record count in sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65450#M14201</link>
      <description>Can anyone help please?</description>
      <pubDate>Mon, 24 Jan 2011 21:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65450#M14201</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-01-24T21:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Record count in sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65451#M14202</link>
      <description>With a SAS assignment you would use the PUT(&lt;VARNAME&gt;,best. -l)  to tell SAS to convert a numeric variable to a character-formatted string (left-justified operand "-l" if needed).&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.

Message was edited by: sbb&lt;/VARNAME&gt;</description>
      <pubDate>Mon, 24 Jan 2011 22:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65451#M14202</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-01-24T22:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Record count in sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65452#M14203</link>
      <description>are you running SAS9.2 ?&lt;BR /&gt;
Have you update privilerger for that table?&lt;BR /&gt;
With option BDIdirectExec; you might be able to use (beware this is untested code)&lt;BR /&gt;
select count(*) into :cases separated by ' ' from appTable;&lt;BR /&gt;
%let string = No of apps processed today= &amp;amp;cases ;&lt;BR /&gt;
update tdata.table1 set txt= "&amp;amp;string"&lt;BR /&gt;
where row_ID = &amp;amp;row_ID /* to be updated */&lt;BR /&gt;
;&lt;BR /&gt;
Otherwise you are back to using explicit pass-thru.&lt;BR /&gt;
If you've not already seen it, you might find useful "Teradata Processing Tips for SAS Users" at&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001399962.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001399962.htm&lt;/A&gt;</description>
      <pubDate>Mon, 24 Jan 2011 23:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65452#M14203</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-01-24T23:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Record count in sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65453#M14204</link>
      <description>Thanks Peter. This worked like a charm!</description>
      <pubDate>Tue, 25 Jan 2011 03:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Record-count-in-sas-dataset/m-p/65453#M14204</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-01-25T03:08:16Z</dc:date>
    </item>
  </channel>
</rss>

