<?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 - Convert Char to NUM in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Convert-Char-to-NUM/m-p/883693#M349134</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Iam trying to insert the rows from SAS dataset to SQL DB with below code. but iam getting error that data does not match between SAS Column (has char datatype) and SQL COlumn (Num datatype).&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*		insert into work.text(&amp;amp;sas_cols)*/
		insert into SQL.DB (&amp;amp;sas_cols)
		select &amp;amp;sas_cols
		from work.sas_cols
	;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;please note that all the columns that wants to insert in sql are defined using %let statment.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%let sas_cols=Text,text1;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;i tried directly the input function and sysfunc (putn) function in %let statement itself, but its is not identified. facing error.&lt;/P&gt;&lt;P&gt;Example column value for same : 31.9249536893167%&lt;/P&gt;&lt;P&gt;would you please help&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2023 11:05:15 GMT</pubDate>
    <dc:creator>JJP1</dc:creator>
    <dc:date>2023-07-06T11:05:15Z</dc:date>
    <item>
      <title>Proc SQL - Convert Char to NUM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Convert-Char-to-NUM/m-p/883693#M349134</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Iam trying to insert the rows from SAS dataset to SQL DB with below code. but iam getting error that data does not match between SAS Column (has char datatype) and SQL COlumn (Num datatype).&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*		insert into work.text(&amp;amp;sas_cols)*/
		insert into SQL.DB (&amp;amp;sas_cols)
		select &amp;amp;sas_cols
		from work.sas_cols
	;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;please note that all the columns that wants to insert in sql are defined using %let statment.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%let sas_cols=Text,text1;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;i tried directly the input function and sysfunc (putn) function in %let statement itself, but its is not identified. facing error.&lt;/P&gt;&lt;P&gt;Example column value for same : 31.9249536893167%&lt;/P&gt;&lt;P&gt;would you please help&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 11:05:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Convert-Char-to-NUM/m-p/883693#M349134</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2023-07-06T11:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL - Convert Char to NUM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Convert-Char-to-NUM/m-p/883697#M349137</link>
      <description>&lt;P&gt;Please show us the entire LOG of this PROC SQL. Do not pick and choose parts of the log for this PROC SQL.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 11:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Convert-Char-to-NUM/m-p/883697#M349137</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-07-06T11:40:01Z</dc:date>
    </item>
  </channel>
</rss>

