Hello Dahlia,
You could try:
-------begin example--------
clear
set obs 3
gen var1="Microsoft"
gen var2="Gates"
gen var3=var1+", "+var2
list
-------end example--------
The comma and space between the quote signs are optional.
-gen- is an abbreviation for -generate-
-set obs 3- makes a new dataset with 3 observations.
Hope this helps,
Michael
Hi, I want to combine two txt fields into one. For example, one field
has company names such as "microsoft" and the other had owner name
such as "Gates", and I want a third field that will combine the two
cells and produce "microsoft Gates." Can anyone tell me how I can do
this in stata?
thanks. I appreciate your help.
dalhia
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/