What I want to do is update the Txt column in a Teardata table with the count from a sas dataset.
txt = 'No of apps processed today' || count.
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 ?
(select count(*) cnt from work.apptable)A;
SET TXT = No of apps processed today' || CAST (A.cnt AS VARCHAR 10),
are you running SAS9.2 ?
Have you update privilerger for that table?
With option BDIdirectExec; you might be able to use (beware this is untested code)
select count(*) into :cases separated by ' ' from appTable;
%let string = No of apps processed today= &cases ;
update tdata.table1 set txt= "&string"
where row_ID = &row_ID /* to be updated */
Otherwise you are back to using explicit pass-thru.
If you've not already seen it, you might find useful "Teradata Processing Tips for SAS Users" at http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001399962.htm