<?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 Correlated reference in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Correlated-reference/m-p/6386#M2505</link>
    <description>I am not sure where to post this question.  If this is not the forum, could you tell me which one.  &lt;BR /&gt;
&lt;BR /&gt;
I am using Proc SQL.  I have the following code.  I have remmed out the sections that are giving me the error with /*    */.  When I put these sections back into the code, I get "Correlated Reference to Column GP_N is not contained within a subquery.  &lt;BR /&gt;
&lt;BR /&gt;
I know it has something to do with the syntax but I am not sure how to correct it. I remmed out the code relating to table GroupCLH since that is what is giving me the problem. I am doing outer joins and I have a one to one join for the GroupCLH table.  It doesn't like where I put it in the from statement.&lt;BR /&gt;
The code is:&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
create table LINDA.LifestyleReturns as&lt;BR /&gt;
Select&lt;BR /&gt;
distinct&lt;BR /&gt;
VIEWLIFESTYLEREPORT.GP_ID,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.CL_N,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.GP_N,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.GP_NM,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.GP_EFF_FRM_DT,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.GP_EFF_TO_DT,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.LSR_CL_IN,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.COLSV_DESC_T,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.LSR_ATP_DESC,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.LSR_PART_DESC,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.LSR_RWD_METH,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.LSR_OTCM_PART,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.GROUP_NUMBER,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.LSR_EFF_FRM_DT,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.LSR_EFF_TO_DT,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.CONTRACT_BEGIN_DT,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.CONTRACT_END_DT,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.GROUP_MKT_STUS_C,&lt;BR /&gt;
/*GROUPCLH.CL_ID,&lt;BR /&gt;
GROUPCLH.CL_ANV_M,&lt;BR /&gt;
GROUPCLH.PARTNERPLAN,&lt;BR /&gt;
GROUPCLH.EPLATFORMIND,*/&lt;BR /&gt;
CLIENTMGR.CL_ID,&lt;BR /&gt;
CLIENTMGR.SD_N,&lt;BR /&gt;
CLIENTMGR.SD_NM,&lt;BR /&gt;
CLIENTMGR.SSSR_N,&lt;BR /&gt;
CLIENTMGR.EM_LAST_NM,&lt;BR /&gt;
CLIENTMGR.CSG,&lt;BR /&gt;
ASM.CL_ID,&lt;BR /&gt;
ASM.SSSR_N,&lt;BR /&gt;
ASM.EM_LAST_NM,&lt;BR /&gt;
VIEWLIFESTYLEWORKLOAD.GROUP_ID,&lt;BR /&gt;
VIEWLIFESTYLEWORKLOAD.FA_TOTAL_CONTRACTS,&lt;BR /&gt;
VIEWLIFESTYLEWORKLOAD.PRODUCT_DESCRIPTION,&lt;BR /&gt;
GENERALADDRESS.CLID,&lt;BR /&gt;
GENERALADDRESS.ADLINE1,&lt;BR /&gt;
GENERALADDRESS.ADLINE2,&lt;BR /&gt;
GENERALADDRESS.CITY,&lt;BR /&gt;
GENERALADDRESS.ST,&lt;BR /&gt;
GENERALADDRESS.ZIP,&lt;BR /&gt;
VIEWLIFESTYLETYPES.GP_ID,&lt;BR /&gt;
VIEWLIFESTYLETYPES.LSR_TYPE_DESC,&lt;BR /&gt;
VIEWLIFESTYLEPROGRAMS.GPID,&lt;BR /&gt;
VIEWLIFESTYLEPROGRAMS.LSRPGMNM,&lt;BR /&gt;
VIEWLIFESTYLEPROGRAMS.LSRPGMTYP,&lt;BR /&gt;
GRPASSOC.CLID,&lt;BR /&gt;
GRPASSOC.ASSOCNUMBER,&lt;BR /&gt;
GRPASSOC.ASSOCIATIONNM&lt;BR /&gt;
From WORK.VIEWLIFESTYLEREPORT/*,WORK.GROUPCLH*/&lt;BR /&gt;
&lt;BR /&gt;
Left join WORK.VIEWLIFESTYLEGROUPS&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_N = VIEWLIFESTYLEGROUPS.GROUP_NUMBER&lt;BR /&gt;
&lt;BR /&gt;
Left join WORK.CLIENTMGR&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = CLIENTMGR.CL_ID&lt;BR /&gt;
Left join WORK.ASM&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = ASM.CL_ID&lt;BR /&gt;
Left join WORK.VIEWLIFESTYLEWORKLOAD&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = VIEWLIFESTYLEWORKLOAD.GROUP_ID&lt;BR /&gt;
Left join WORK.GENERALADDRESS&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = GENERALADDRESS.CLID&lt;BR /&gt;
Left join WORK.VIEWLIFESTYLETYPES&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = VIEWLIFESTYLETYPES.GP_ID&lt;BR /&gt;
Left join WORK.VIEWLIFESTYLEPROGRAMS&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = VIEWLIFESTYLEPROGRAMS.GPID&lt;BR /&gt;
Left join WORK.GRPASSOC&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = GRPASSOC.CLID&lt;BR /&gt;
/*Where VIEWLIFESTYLEREPORT.GP_ID = GROUPCLH.CL_ID*/&lt;BR /&gt;
Where VIEWLIFESTYLEWORKLOAD.PRODUCT_DESCRIPTION &amp;lt;&amp;gt; 'Supplemental Only';&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
quit;

Message was edited by: lloraine</description>
    <pubDate>Tue, 15 Jan 2008 20:00:40 GMT</pubDate>
    <dc:creator>lloraine</dc:creator>
    <dc:date>2008-01-15T20:00:40Z</dc:date>
    <item>
      <title>Correlated reference</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Correlated-reference/m-p/6386#M2505</link>
      <description>I am not sure where to post this question.  If this is not the forum, could you tell me which one.  &lt;BR /&gt;
&lt;BR /&gt;
I am using Proc SQL.  I have the following code.  I have remmed out the sections that are giving me the error with /*    */.  When I put these sections back into the code, I get "Correlated Reference to Column GP_N is not contained within a subquery.  &lt;BR /&gt;
&lt;BR /&gt;
I know it has something to do with the syntax but I am not sure how to correct it. I remmed out the code relating to table GroupCLH since that is what is giving me the problem. I am doing outer joins and I have a one to one join for the GroupCLH table.  It doesn't like where I put it in the from statement.&lt;BR /&gt;
The code is:&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
create table LINDA.LifestyleReturns as&lt;BR /&gt;
Select&lt;BR /&gt;
distinct&lt;BR /&gt;
VIEWLIFESTYLEREPORT.GP_ID,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.CL_N,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.GP_N,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.GP_NM,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.GP_EFF_FRM_DT,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.GP_EFF_TO_DT,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.LSR_CL_IN,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.COLSV_DESC_T,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.LSR_ATP_DESC,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.LSR_PART_DESC,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.LSR_RWD_METH,&lt;BR /&gt;
VIEWLIFESTYLEREPORT.LSR_OTCM_PART,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.GROUP_NUMBER,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.LSR_EFF_FRM_DT,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.LSR_EFF_TO_DT,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.CONTRACT_BEGIN_DT,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.CONTRACT_END_DT,&lt;BR /&gt;
VIEWLIFESTYLEGROUPS.GROUP_MKT_STUS_C,&lt;BR /&gt;
/*GROUPCLH.CL_ID,&lt;BR /&gt;
GROUPCLH.CL_ANV_M,&lt;BR /&gt;
GROUPCLH.PARTNERPLAN,&lt;BR /&gt;
GROUPCLH.EPLATFORMIND,*/&lt;BR /&gt;
CLIENTMGR.CL_ID,&lt;BR /&gt;
CLIENTMGR.SD_N,&lt;BR /&gt;
CLIENTMGR.SD_NM,&lt;BR /&gt;
CLIENTMGR.SSSR_N,&lt;BR /&gt;
CLIENTMGR.EM_LAST_NM,&lt;BR /&gt;
CLIENTMGR.CSG,&lt;BR /&gt;
ASM.CL_ID,&lt;BR /&gt;
ASM.SSSR_N,&lt;BR /&gt;
ASM.EM_LAST_NM,&lt;BR /&gt;
VIEWLIFESTYLEWORKLOAD.GROUP_ID,&lt;BR /&gt;
VIEWLIFESTYLEWORKLOAD.FA_TOTAL_CONTRACTS,&lt;BR /&gt;
VIEWLIFESTYLEWORKLOAD.PRODUCT_DESCRIPTION,&lt;BR /&gt;
GENERALADDRESS.CLID,&lt;BR /&gt;
GENERALADDRESS.ADLINE1,&lt;BR /&gt;
GENERALADDRESS.ADLINE2,&lt;BR /&gt;
GENERALADDRESS.CITY,&lt;BR /&gt;
GENERALADDRESS.ST,&lt;BR /&gt;
GENERALADDRESS.ZIP,&lt;BR /&gt;
VIEWLIFESTYLETYPES.GP_ID,&lt;BR /&gt;
VIEWLIFESTYLETYPES.LSR_TYPE_DESC,&lt;BR /&gt;
VIEWLIFESTYLEPROGRAMS.GPID,&lt;BR /&gt;
VIEWLIFESTYLEPROGRAMS.LSRPGMNM,&lt;BR /&gt;
VIEWLIFESTYLEPROGRAMS.LSRPGMTYP,&lt;BR /&gt;
GRPASSOC.CLID,&lt;BR /&gt;
GRPASSOC.ASSOCNUMBER,&lt;BR /&gt;
GRPASSOC.ASSOCIATIONNM&lt;BR /&gt;
From WORK.VIEWLIFESTYLEREPORT/*,WORK.GROUPCLH*/&lt;BR /&gt;
&lt;BR /&gt;
Left join WORK.VIEWLIFESTYLEGROUPS&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_N = VIEWLIFESTYLEGROUPS.GROUP_NUMBER&lt;BR /&gt;
&lt;BR /&gt;
Left join WORK.CLIENTMGR&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = CLIENTMGR.CL_ID&lt;BR /&gt;
Left join WORK.ASM&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = ASM.CL_ID&lt;BR /&gt;
Left join WORK.VIEWLIFESTYLEWORKLOAD&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = VIEWLIFESTYLEWORKLOAD.GROUP_ID&lt;BR /&gt;
Left join WORK.GENERALADDRESS&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = GENERALADDRESS.CLID&lt;BR /&gt;
Left join WORK.VIEWLIFESTYLETYPES&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = VIEWLIFESTYLETYPES.GP_ID&lt;BR /&gt;
Left join WORK.VIEWLIFESTYLEPROGRAMS&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = VIEWLIFESTYLEPROGRAMS.GPID&lt;BR /&gt;
Left join WORK.GRPASSOC&lt;BR /&gt;
On VIEWLIFESTYLEREPORT.GP_ID = GRPASSOC.CLID&lt;BR /&gt;
/*Where VIEWLIFESTYLEREPORT.GP_ID = GROUPCLH.CL_ID*/&lt;BR /&gt;
Where VIEWLIFESTYLEWORKLOAD.PRODUCT_DESCRIPTION &amp;lt;&amp;gt; 'Supplemental Only';&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
quit;

Message was edited by: lloraine</description>
      <pubDate>Tue, 15 Jan 2008 20:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Correlated-reference/m-p/6386#M2505</guid>
      <dc:creator>lloraine</dc:creator>
      <dc:date>2008-01-15T20:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Correlated reference</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Correlated-reference/m-p/6387#M2506</link>
      <description>Hi:&lt;BR /&gt;
  This is not an ODS or Base Report procedure (PRINT, REPORT, TABULATE) question. There's not really a forum for SQL and for your code example, Tech Support is your best bet for detailed SQL help.&lt;BR /&gt;
 &lt;BR /&gt;
  To send a question to Tech Support, go to &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt; and in the left-hand navigation pane, click on the link entitled "Submit a Problem" (under the heading for Support).&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 16 Jan 2008 01:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Correlated-reference/m-p/6387#M2506</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-01-16T01:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Correlated reference</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Correlated-reference/m-p/6388#M2507</link>
      <description>May i add to the answer of Cynthia&lt;BR /&gt;
that you may also ask this kind of question to the&lt;BR /&gt;
sas users discussion list  'SAS-L'&lt;BR /&gt;
as you were asking "could you tell me which one".&lt;BR /&gt;
&lt;BR /&gt;
When i was searching on google group:&lt;BR /&gt;
group:comp.soft-sys.sas author:Linda author:Rutge&lt;BR /&gt;
i have seen none reference and it lead me to think&lt;BR /&gt;
that perhaps you are not aware of its existence.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://groups.google.fr/group/comp.soft-sys.sas/about" target="_blank"&gt;http://groups.google.fr/group/comp.soft-sys.sas/about&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Of course, Technical sas support is the best official place &lt;BR /&gt;
for having a solution upon a technical question&lt;BR /&gt;
but in case of lack of practice and so one some sas users&lt;BR /&gt;
may also provide quick 'unofficial' answer.&lt;BR /&gt;
&lt;BR /&gt;
Cynthia may correct this sentence after.&lt;BR /&gt;
&lt;BR /&gt;
Andre</description>
      <pubDate>Wed, 16 Jan 2008 08:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Correlated-reference/m-p/6388#M2507</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2008-01-16T08:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Correlated reference</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Correlated-reference/m-p/6389#M2508</link>
      <description>Stick with the JOIN syntax and try something like&lt;BR /&gt;
From WORK.VIEWLIFESTYLEREPORT&lt;BR /&gt;
inner join WORK.GROUPCLH&lt;BR /&gt;
on viewlifestylereport.common_key = groupclh.common_key&lt;BR /&gt;
Left join WORK.VIEWLIFESTYLEGROUPS</description>
      <pubDate>Wed, 16 Jan 2008 13:22:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Correlated-reference/m-p/6389#M2508</guid>
      <dc:creator>advoss</dc:creator>
      <dc:date>2008-01-16T13:22:34Z</dc:date>
    </item>
  </channel>
</rss>

