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

Queries in SAS DI Studio

Reply
Regular Contributor
Posts: 167

Queries in SAS DI Studio

Hi,

I am planning to use a join transformation in SAS DI Studio to join two tables A and B. The relationship between A and B is one to Many. For each row in A , I would like to take only one record from B. Is there any function which allows to perform this?

Thanks in advance,

Regards,

Sheeba Swaminathan

Respected Advisor
Posts: 4,173

Re: Queries in SAS DI Studio

How would you select this record from "B"? Could you use a DISTINCT or Group By in a sub-select prior to joining with A so that the relationship becomes 1:1?

Regular Contributor
Posts: 167

Re: Queries in SAS DI Studio

tnx a lot Patrick.

Distinct keyword helped me out.

Super User
Posts: 5,426

Re: Queries in SAS DI Studio

You could also use the Look-up transformation right off, that will pick only one record from the look-up table.

Is there any logic you wish to apply when choosing the B record?

Data never sleeps
Regular Contributor
Posts: 167

Re: Queries in SAS DI Studio

tnx a lot Linush.

Any record from Table B would be a fit for join....

Ask a Question
Discussion stats
  • 4 replies
  • 358 views
  • 0 likes
  • 3 in conversation