<?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: Proc SQL subquery in a left join in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428567#M27632</link>
    <description>&lt;P&gt;Where does your subquery end? I don't see any closing bracket.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 19:37:19 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2018-01-17T19:37:19Z</dc:date>
    <item>
      <title>Proc SQL subquery in a left join</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428412#M27602</link>
      <description>&lt;P&gt;I am trying to use a subquery within a left join and I am getting this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: ORACLE prepare error: ORA-00905: missing keyword. SQL statement: select WDM_HSBSB_SUBSC.SBSB_ID as CARD_HLDR_ID_NUM,&lt;/P&gt;&lt;P&gt;WDM_HMEME_MEMBER.MEME_FIRST_NAME || ' ' || WDM_HMEME_MEMBER.MEME_LAST_NAME as PATIENT_NAME, WDM_HMEME_MEMBER.MEME_BIRTH_DT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a sample of my code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;left&lt;/FONT&gt; &lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;join&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;(&amp;nbsp; &lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp; max (HIDCD_SK) &lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; max_HIDCD_SK,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDCD_DESC&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; WDM_HIDCD_DIAG_CD&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; max_HIDCD_SK = HIDCD_SK) &lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; DIAG_DESC&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;on&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; (WDM_DDIST_DIAG_SET.DDIST_IDCD_AD = DIAG_DESC.max_HIDCD_SK)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;WDM_HSBSB_SUBSC.SBSB_ID &lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;in&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;'XXXXX'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)&lt;FONT color="#008080" face="Courier New" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; WDM_DFNIN_FUNDING_INFO.DFNIN_CLAIM_TYPE &amp;lt;&amp;gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;'R'&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New" size="3"&gt;/* R = pharmacy */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; WFT_FCDML_CL_LINE.FCDML_RPT_PAID_DT &amp;lt;&amp;gt; WFT_FCDML_CL_LINE.FCDML_PROCESS_DT&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; WDM_HCLCL_CLAIM.HCLCL_AS_OF_TO_DT = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;'31-Dec-9999'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff00ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; WDM_DCDBC_CL_LINE_BCN_CODES.DCDCD_DENIAL_IND = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;'N'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428412#M27602</guid>
      <dc:creator>cmcquain</dc:creator>
      <dc:date>2018-01-17T15:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL subquery in a left join</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428419#M27603</link>
      <description>&lt;P&gt;Since you are not sharing the full code, I'm assuming your submitting this in a pass through block (...FROM CONNECTION TO...).&lt;/P&gt;
&lt;P&gt;Everything within this block is totally agnostic for SAS, it's the responsibility for the target DBMS (Oracle). So reach out to your fellow Oracle users instead.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428419#M27603</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-01-17T15:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL subquery in a left join</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428427#M27606</link>
      <description>&lt;P&gt;You are correct I am using a pass through.&amp;nbsp; I will start searching oracle joins then.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:35:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428427#M27606</guid>
      <dc:creator>cmcquain</dc:creator>
      <dc:date>2018-01-17T15:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL subquery in a left join</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428445#M27611</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#ff00ff"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;max_HIDCD_SK = HIDCD_SK)&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#ff00ff"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;DIAG_DESC&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#ff00ff"&gt;on&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(WDM_DDIST_DIAG_SET.DDIST_IDCD_AD = DIAG_DESC.max_HIDCD_SK)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;BR /&gt;That first line doesn't look correct, you usually don't alias on WHERE conditions?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428445#M27611</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-17T15:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL subquery in a left join</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428567#M27632</link>
      <description>&lt;P&gt;Where does your subquery end? I don't see any closing bracket.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 19:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/428567#M27632</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-01-17T19:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL subquery in a left join</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/430446#M27777</link>
      <description>&lt;P&gt;It's there.&amp;nbsp; I just didn't copy and paste it.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 14:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-SQL-subquery-in-a-left-join/m-p/430446#M27777</guid>
      <dc:creator>cmcquain</dc:creator>
      <dc:date>2018-01-24T14:31:16Z</dc:date>
    </item>
  </channel>
</rss>

