title: Data export from SQL Server to Excel
body: <p>I have been thinking of a way to export data from SQL to Excel. There is the option of making use of export/import wizard. Bit in my case, the table has columns, which consists of numbers. And these numbers refer to values which are stored in another table. For example, suppose the table has a column country_id with numbers 1, 2,3 and so on. There is another table which consists of these numbers as its primary key and its corresponding row, the country name.</p>
  
  <p>Eg:</p>
  
  <p>1        UK</p>
  
  <p>2        China</p>
  
  <p>3        USA</p>
  
  <p>So, on exporting i want these country names to appear instead of the numbers. This will require a customized query. Can anyone please provide me with an example on how to start this? How to write the export part of the query? Are there any tutorials on how to write these type of queries.</p>