<?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: Question about setting up a simple expression in an SQL Join in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Question-about-setting-up-a-simple-expression-in-an-SQL-Join/m-p/100890#M1120</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, these expression have errors, which you probably encountered!&lt;/P&gt;&lt;P&gt;IF-THEN-ELSE-logic belongs to the data step, not "permitted" in SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A case statement should not end with a ;, that will end the whole CREATE VIEW/TABLE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that correct that you already have a BANK_FLAG in the source table, and you just want to change it's value for a specific bank?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Feb 2013 10:50:40 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2013-02-07T10:50:40Z</dc:date>
    <item>
      <title>Question about setting up a simple expression in an SQL Join</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Question-about-setting-up-a-simple-expression-in-an-SQL-Join/m-p/100889#M1119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working in an SQL Join transformation in DI Studio, and need to make sure that all rows for one specific bank get the flag-variable set to "N".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why can't I just map the BANK_ID and BANK_FLAG from the source table, into BANK_FLAG in the target table, then use the following expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;if BANK_ID = "123456" then do;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; BANK_FLAG = "N";&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;case BANK_FLAG&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when BANK_ID = "123456" then "N"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else BANK_FLAG&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd appreciate any aid on this rookie problem. Thanks for your time. &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, 07 Feb 2013 08:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Question-about-setting-up-a-simple-expression-in-an-SQL-Join/m-p/100889#M1119</guid>
      <dc:creator>TurnTheBacon</dc:creator>
      <dc:date>2013-02-07T08:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Question about setting up a simple expression in an SQL Join</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Question-about-setting-up-a-simple-expression-in-an-SQL-Join/m-p/100890#M1120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, these expression have errors, which you probably encountered!&lt;/P&gt;&lt;P&gt;IF-THEN-ELSE-logic belongs to the data step, not "permitted" in SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A case statement should not end with a ;, that will end the whole CREATE VIEW/TABLE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that correct that you already have a BANK_FLAG in the source table, and you just want to change it's value for a specific bank?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 10:50:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Question-about-setting-up-a-simple-expression-in-an-SQL-Join/m-p/100890#M1120</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-02-07T10:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Question about setting up a simple expression in an SQL Join</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Question-about-setting-up-a-simple-expression-in-an-SQL-Join/m-p/100891#M1121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. Yes, that's correct. I know how to do it in user written code, but apparently not in an SQL Join expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 11:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Question-about-setting-up-a-simple-expression-in-an-SQL-Join/m-p/100891#M1121</guid>
      <dc:creator>TurnTheBacon</dc:creator>
      <dc:date>2013-02-07T11:00:18Z</dc:date>
    </item>
  </channel>
</rss>

