How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?
No Answer is Posted For this Question
Be the First to Post Answer
Differentiate input and infile.
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.
Difference between SAS STATA & SPSS?
i have a null dataset with 20 variables. i want to upload the variables which contain name like a or k or anything in another dataset.how can we create the dataset?
Does anybody have SAS Training manual or documentation or can you refer me any book to have better understanding on SAS. I am fresher to SAS tool. (Ready to pay)
how do i get last 10obs from a dataset when we don't know about the number of obsevations in that dataset?
I need help in merging two different datasets. I am merging by date and I want to propagate observations from one dataset to the corresponding dates. One dataset has a unique date for each day of the month, while the other dataset has same date for different patient visits. For example I want to spread an observation on the 31DEC2008 from one dataset to several observations with the same date on a second dataset for all the patients who visited on that date. I have tried to merge the two and the result is not what I wanted. Instead I get a dataset whereby all the dates have missing values where observations from the first datset should have spread.
What does proc print, and proc contents are used for?
How to get top scorer student from a class-table having different sections A,B, C & D? Each section having same number of students.
Name and describe few sas character functions that are used for data cleaning in brief.
Diff between proc sql merge and join?
What is the use of stop statement?