Hi sir, I have a doubt, can u tell me how to read? Data a; Input name$ salary age; Datalines; mani 2300 24 Anil 2500 45 Maheshmani 3000 28 Mahesh chintha 4200 30 ; Run;
Hi Chintha, Interesting. Just use some extra space to separate the values as in the last observation you want to keep first and last name in one variable which have one space in between them. and use an ampersand in the Input statement with name variable. see below e.g. - Data a; Input name & $20. salary age; Datalines; mani 2300 24 Anil 2500 45 Maheshmani 3000 28 Mahesh chintha 4200 30 ; Run;
@@rajutelagareddi2036, Normally char values read only 8 characters long by default , sometime the values of the char exceeds 8 , so we use the char length like positionally $1-20 or in length $20. but these won't work properly if there is a space in the variable value . in our case can't be read properly with $1-20 or in length $20. because it won't take spaces . so , if you put '&' in the beginning like & $20. This means it will considers space even two or more spaces . even if your values is , & $20 this will work ..
great brother........... i have no words to appreciate your explanation
Thank you so much 😀
Hey you have explained very easily.
U have used good approach.
To the point and relevant.
Fantastic way
Glad you liked it 👏
Thank you sir.. Good explanation 👍
God bless you man ❤
Super explanation sir.........
Thanks and welcome
Great explanation. Thanks a lot
Glad you liked it 👏
Fantastic !
Glad you like it!
Nicely explained
Thank you
Such a great video, why don’t you create video on SDTM and on AdAM.
Salute you Sir.
where is this "trans" dataset? Thanks!
Thank you so much!!
Glad it helped!
Can we use functions like mean , sum in after then statement?
While you are summarising
Can we do this in proc sql?
You can use row number partition by in SQL and not in Proc SQL
Can we use proc rank to create counter?
Hi sir, I have a doubt, can u tell me how to read?
Data a;
Input name$ salary age;
Datalines;
mani 2300 24
Anil 2500 45
Maheshmani 3000 28
Mahesh chintha 4200 30
;
Run;
Hi Chintha,
Interesting.
Just use some extra space to separate the values as in the last observation you want to keep first and last name in one variable which have one space in between them. and use an ampersand in the Input statement with name variable. see below e.g. -
Data a;
Input name & $20. salary age;
Datalines;
mani 2300 24
Anil 2500 45
Maheshmani 3000 28
Mahesh chintha 4200 30
;
Run;
@@learnerea thank you sir, its working
@@learnerea sir what & do here
@@rajutelagareddi2036, Normally char values read only 8 characters long by default , sometime the values of the char exceeds 8 , so we use the char length like positionally $1-20 or in length $20. but these won't work properly if there is a space in the variable value . in our case can't be read properly with $1-20 or in length $20. because it won't take spaces .
so , if you put '&' in the beginning like & $20. This means it will considers space even two or more spaces .
even if your values is , & $20 this will work ..
How to get last 2 trxn details of each Customer_name?
First sort the data in descending order and then use the same technique to create counter variable and the pick those where counter
Sir when I am practicing this the count variable is not getting created
Why is it ??
Please put your syntax here so that we could review that