When merging 2 datasets with a common variable (not merge
key), how to keep both?
Answer Posted / reshma
data newdata;
merge dataset1 (in=a) datset2 (in=b);
if a or b;
by commonvar;
run;
Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
Why and when do you use proc sql?
Which function is used to count the number of intervals between two sas dates?
how would you create multiple observations from a single observation? : Sas programming
What is your favorite all time computer book? Why?
To what type of programms have you used scratch macros?
What do you code to create a macro? : sas-macro
Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?
what do the sas log messages "numeric values have been converted to character" mean? : Sas programming
What are the statements that are executed only?
what r the job openings SAS for fresher graduates !
Explain what is data step?
Hello, I have PROC SQLs results group by 3 fields and I use SUM and COUNT functions in SQL. The problem is when I try to display my result with PROC TABULATE. I am getting very big numbers. I believe I make a mistake some where in Tabulate. Here is my Proc Tabulate. PROC TABULATE DATA=OUT04_05 FORMAT=12.; CLASS YR CENTRE VISA / PRELOADFMT EXCLUSIVE; VAR NEWUSER FRAUD TRANSFER AUTUSER REISSUE; TABLE CENTRE ALL, (YR ALL)*VISA, (NEWUSER*F=COMMA12. AUTUSER*F=COMMA12. FRAUD*F=COMMA12. TRANSFER*F=COMMA12. REISSUE*F=COMMA12.) / MISSTEXT={LABEL='0'} PRINTMISS RTS=20; FORMAT VISA VISAFMT.; KEYLABEL SUM = ' ' ALL = 'TOTAL'; LABEL YR = 'DATE YEAR' NEWUSER = 'TOTAL NEW ACCT' TRANSFER = 'TOTAL TRANSFER' FRAUD = 'TOTAL FRAUD TRANSFER' AUTUSER = 'TOTAL AUTH USERS' REISSUE = 'TOTAL REISSUE'; When I code it like : NEWUSER*N*F=COMMA12. AUTUSER*N*F=COMMA12. I get same amount numbers but to find a NEWUSER I use COUNT(*) and to find AUTUSER I use SUM(xxxx) function so both result shouldn’t be the same my problem is in this point. Could you tell me where the problem in code is. How can I display my result? TX.
How to limit decimal places for variable using proc means?
what is star schema? : Sas-di
How would you include common or reuse to be processed along with your statements?