<?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: Extract versus SQL Join in DI Studio: Best practices? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Extract-versus-SQL-Join-in-DI-Studio-Best-practices/m-p/127047#M1651</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this situation it would be my preference to use SQL rather than a datastep purely because SQL syntax is widely used and understood, by programmers from a variety of application backgrounds.&amp;nbsp; This can be important if (1) your code will be audited by a third party, or (2) if [wash your mouth!] management decides to move away from using SAS.&amp;nbsp; So unless particular datastep functionality (first. or last. processing, or arrays) I would advocate SQL if you have the choice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard in Oz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2012 12:14:11 GMT</pubDate>
    <dc:creator>RichardinOz</dc:creator>
    <dc:date>2012-11-15T12:14:11Z</dc:date>
    <item>
      <title>Extract versus SQL Join in DI Studio: Best practices?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extract-versus-SQL-Join-in-DI-Studio-Best-practices/m-p/127046#M1650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd appreciate it if someone can please inform me of, or direct me to a place where I can learn about, best practices on when/why to use an Extract instead of an SQL Join, and vice versa. In example, if I have an Extract with a very long and complex Where-statement, is it best practise to switch to an SQL Join to make it look more orderly even though there's only one input table and no need for joins?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ask because I remember many jobs where people have used SQL Joins instead of Extracts despite there only being one input table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 11:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extract-versus-SQL-Join-in-DI-Studio-Best-practices/m-p/127046#M1650</guid>
      <dc:creator>TurnTheBacon</dc:creator>
      <dc:date>2012-11-15T11:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Extract versus SQL Join in DI Studio: Best practices?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extract-versus-SQL-Join-in-DI-Studio-Best-practices/m-p/127047#M1651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this situation it would be my preference to use SQL rather than a datastep purely because SQL syntax is widely used and understood, by programmers from a variety of application backgrounds.&amp;nbsp; This can be important if (1) your code will be audited by a third party, or (2) if [wash your mouth!] management decides to move away from using SAS.&amp;nbsp; So unless particular datastep functionality (first. or last. processing, or arrays) I would advocate SQL if you have the choice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard in Oz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 12:14:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extract-versus-SQL-Join-in-DI-Studio-Best-practices/m-p/127047#M1651</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2012-11-15T12:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extract versus SQL Join in DI Studio: Best practices?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Extract-versus-SQL-Join-in-DI-Studio-Best-practices/m-p/127048#M1652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both Extract and SQL Join uses SQL, so there is no issue here to use a data step...&lt;/P&gt;&lt;P&gt;As you said yourself, SQL Join comes with a lot more possibilities in the GUI, and metadata driven syntax, than Extract.&lt;/P&gt;&lt;P&gt;I can't say the one or the other is best practice, as long you have "ordinary" where clauses. But if you feel that the where clause builder is better than the advanced expression builder in Extract, use SQL Join.&lt;/P&gt;&lt;P&gt;If you intend to use more complex things like sub-query and stuff like that, SQL Join would the prefered transformation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 14:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Extract-versus-SQL-Join-in-DI-Studio-Best-practices/m-p/127048#M1652</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-11-15T14:07:28Z</dc:date>
    </item>
  </channel>
</rss>

