<?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 Sas to Teradata  sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sas-to-Teradata-sql/m-p/557689#M155510</link>
    <description>&lt;P&gt;I want the following code to be converted to Teradata SQL. Please help. Thanks In advance.&lt;BR /&gt;&lt;BR /&gt;data weight2;&lt;BR /&gt;input IDnumber $ Week1;&lt;BR /&gt;datalines;&lt;BR /&gt;2477 200&lt;BR /&gt;2477 295&lt;BR /&gt;2431 220&lt;BR /&gt;2431 150&lt;BR /&gt;2412 135&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;proc sort data=weight2;&lt;BR /&gt;by descending IDnumber ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data we;&lt;BR /&gt;set weight2 ;&lt;BR /&gt;by descending IDnumber;&lt;BR /&gt;if first.IDnumber then do;&lt;BR /&gt;y=0;&lt;BR /&gt;end;&lt;BR /&gt;y=Week1-y;&lt;BR /&gt;retain y;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2019 06:40:28 GMT</pubDate>
    <dc:creator>Harish32</dc:creator>
    <dc:date>2019-05-10T06:40:28Z</dc:date>
    <item>
      <title>Sas to Teradata  sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-to-Teradata-sql/m-p/557689#M155510</link>
      <description>&lt;P&gt;I want the following code to be converted to Teradata SQL. Please help. Thanks In advance.&lt;BR /&gt;&lt;BR /&gt;data weight2;&lt;BR /&gt;input IDnumber $ Week1;&lt;BR /&gt;datalines;&lt;BR /&gt;2477 200&lt;BR /&gt;2477 295&lt;BR /&gt;2431 220&lt;BR /&gt;2431 150&lt;BR /&gt;2412 135&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;proc sort data=weight2;&lt;BR /&gt;by descending IDnumber ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data we;&lt;BR /&gt;set weight2 ;&lt;BR /&gt;by descending IDnumber;&lt;BR /&gt;if first.IDnumber then do;&lt;BR /&gt;y=0;&lt;BR /&gt;end;&lt;BR /&gt;y=Week1-y;&lt;BR /&gt;retain y;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 06:40:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-to-Teradata-sql/m-p/557689#M155510</guid>
      <dc:creator>Harish32</dc:creator>
      <dc:date>2019-05-10T06:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sas to Teradata  sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-to-Teradata-sql/m-p/557711#M155521</link>
      <description>&lt;P&gt;This is a SAS community, so Teradata knowledge can be limited.&lt;/P&gt;
&lt;P&gt;The logic you show is not easy to directly convert to SQL, could be if Teradata have some specific functions/syntax for this.&lt;/P&gt;
&lt;P&gt;You might be better off asking in a Teradata forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For slightly simpler queries, just use a Teradata libname, it will generate Teradata SQL on the fly (implicit SQL pass through).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 08:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-to-Teradata-sql/m-p/557711#M155521</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2019-05-10T08:51:15Z</dc:date>
    </item>
  </channel>
</rss>

