Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between x=substr(name,1,2);
and substr(name,1,2)='x';

Answer Posted / sattwik panda

x=substr(name,1,2) will return first two character of a string whereas substr(name,1,2)='x' will replace first two character by 'x'.
Please try using the code below to get an idea.
data test;
name="Sattwik";
x=substr(name,1,2);
substr(name,1,2)='x';
run;

x will have the first two characters of name:'Sa'.
substr(name,1,2)='x' will replace first two characters of "Sattwik". So, now the name will contain "xttwik".

Is This Answer Correct ?    46 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the scrubbing procedures in sas?

1008


What are SAS/ACCESS and SAS/CONNECT?

1149


what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming

1090


What do the put and input function do?

1064


what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi

1022


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?

1101


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)?

1684


What Proc glm does?

1088


what is intially documentation in sas?

5052


Mention what is the difference between nodupkey and nodup options?

1011


what is the function of catx syntax? : Sas-administrator

1103


name several ways to achieve efficiency in your program? : Sas programming

1073


what do you mean by data staging area? : Sas-di

1142


What is the basic structure of the SAS base program?

1329


What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro

1038