SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

SAS-DI Error returned when data being fetched - LEFT Join

Reply
Occasional Learner
Posts: 1

SAS-DI Error returned when data being fetched - LEFT Join

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!

Super User
Posts: 5,255

Re: SAS-DI Error returned when data being fetched - LEFT Join

Perhaps you have the default setting of creating a view os transformation output? There cab be some errors that isn't discovered until view execution. Uncheck the view option and try again.

When going from/to outer and inner joins you need to consider the implicit join criteria. DI Studio does not automatically change the Join criteria (between where in inner join to on when outer join is chosen).
Data never sleeps
Super User
Posts: 3,102

Re: SAS-DI Error returned when data being fetched - LEFT Join

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?

Ask a Question
Discussion stats
  • 2 replies
  • 284 views
  • 0 likes
  • 3 in conversation