The post demonstrates how to put a value within a quotation mark in excel.
Let’s see a scenario where we have to insert a condition in some SQL query’s IN operator, the values should be within Quote and separated by comma and you have a large number of values.
As you could see above we have data in column A and the comma separated list of values that are placed within quotation mark is in column B.
We will use simple concatenation operator “&” in excel to embed quotes into the values in excel.
Insert the formula =”””&A2&””” in cell B2 to put the values within quotation mark.
Now drag the formula downwards till the data is available to get the list values within quotes in excel.
Now open a notepad text file and copy the values from excel and paste it into text file as shown below.
You have the values inside the quotation marks to be used anywhere.
The values could directly be pasted into SQL editor if that is what you are looking for.
Hope this helped.