Hi,
I hope you can help. I have a LEFT join as part of my JOIN transformation, and although the job runs to completion, when I try to open the results for the temporary work table the following error is displayed:
Unable to execute query: SQL passthru expression contained these errors: ERROR: Correlated reference to column CourtesyTitleID is not contained within a subquery.
If I change the join to an INNER join it works.
I am connecting to our MS SQL Server 2012 database via ODBC.
Any ideas?
Cheers!
I've seen this error recently with manually written SQL and I managed to fix it by moving the query providing the column mentioned in the error before the sub-query. You shouldn't have to do this with SQL as it should be order insensitive.
Are you able to do that in DI? If possible can you post the log containing the generated code with the error?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.