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
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?
tnx a lot Patrick.
Distinct keyword helped me out.
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?
tnx a lot Linush.
Any record from Table B would be a fit for join....
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.