I am not sure where to post this question. If this is not the forum, could you tell me which one.
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.
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.
The code is:
Left join WORK.VIEWLIFESTYLEGROUPS
On VIEWLIFESTYLEREPORT.GP_N = VIEWLIFESTYLEGROUPS.GROUP_NUMBER
Left join WORK.CLIENTMGR
On VIEWLIFESTYLEREPORT.GP_ID = CLIENTMGR.CL_ID
Left join WORK.ASM
On VIEWLIFESTYLEREPORT.GP_ID = ASM.CL_ID
Left join WORK.VIEWLIFESTYLEWORKLOAD
On VIEWLIFESTYLEREPORT.GP_ID = VIEWLIFESTYLEWORKLOAD.GROUP_ID
Left join WORK.GENERALADDRESS
On VIEWLIFESTYLEREPORT.GP_ID = GENERALADDRESS.CLID
Left join WORK.VIEWLIFESTYLETYPES
On VIEWLIFESTYLEREPORT.GP_ID = VIEWLIFESTYLETYPES.GP_ID
Left join WORK.VIEWLIFESTYLEPROGRAMS
On VIEWLIFESTYLEREPORT.GP_ID = VIEWLIFESTYLEPROGRAMS.GPID
Left join WORK.GRPASSOC
On VIEWLIFESTYLEREPORT.GP_ID = GRPASSOC.CLID
/*Where VIEWLIFESTYLEREPORT.GP_ID = GROUPCLH.CL_ID*/
Where VIEWLIFESTYLEWORKLOAD.PRODUCT_DESCRIPTION <> 'Supplemental Only';
Of course, Technical sas support is the best official place
for having a solution upon a technical question
but in case of lack of practice and so one some sas users
may also provide quick 'unofficial' answer.