title: How to transform a column with multiple numbers into a series of dummy variables?
body: <p>I need to transform some data for import into a relational database. In the database entity, there is a series of 21 yes/no variables. In the current format, there is a single column with a series of numbers, separated by spaces, each one corresponding to a "yes" for that variable.</p>
  
  <p>For example, the column might read "3 7 12 20", which would correspond to "Yes" for variables 3, 7, 12, and 20, and "No" for all others.</p>
  
  <p>I need to transform that column into the dummy variable format. I know I can use the "Text to Columns" tool in excel to separate the numbers in the column. But that's as far as I've gotten. How can I tell the software that a numerical column corresponds to a certain value for a certain column?</p>
  
  <p>I am hoping to do this in Excel but also have beginning proficiency in SQL and Stata.</p>
  
  <p>Thanks!</p>