Comma Quote  - The Online Comma Separator 
 


How do I use it?

Simply put your list of items into the input text box, with each item on a new line.  eg:

item 1
item 2
item 3

Click the convert button, and in the ouput box, you'll receive the list above, but now comma separated.


What do the options do?

By default, the site will simply turn your list into a plain comma separated list.  However the options allow you to do something a little more.  Firstly the separator character allows you to chose something other than a comma.  For example you may want a semi-colon, or colon separated list.  Simply change the character to one of your chosing, then hit convert.

Then we have three options to do with quotes.  By default, they're turned off, but we can chose to turn on single quotes (eg. 'item') or double quotes (eg. "item").  These options are very useful when dealing with SQL lists of text, where as not using any quotes works nicely for lists of integers.


How might I use the output?

Ok, let's give you a few examples:

Example 1:   Someone has given you a list of Job ID's, these are integers, and you've been asked to get the full record for each.  Typically the SQL for this task would be:  SELECT * FROM MyTable WHERE JobID In (<My List>).

At this point you may have pasted in your JobID list, and then gone down the left side adding the commas.  Not bad for 4 or 5 items, but a pain for several hundred.  Indeed when you're faced with that many, you may have imported them into a temporary table, and joined against that.  This site gives you a valid extra option.  Copy your list into the input box, with the default settings, hit convert, and place the output where it says <MyList> above.  Your query should then run.

Example 2:  As above, but this time they've given you a list of postcodes, and want back any records with them.  Typically the SQL for this task would be : SELECT * FROM MyTable WHERE Postcode in (<MyList>). 

Annoyingly because this is a text compare, you'd be using quotes, so '1AA AA1','2BB BB2','3CC CC3'.   In this instance the temporary table is looking  a good option, but once again this site can help, select the single quote option and hit convert, you'll get out a list like the example which you can paste straight into the query.


Does it really save time?

Your mileage may vary.  Depending on many factors, other solutions may be better.  However for adhoc queries, and where the list isn't too out of shape, this site gives you a quick easy way to work.


Do you store my data?

No.  There is no database behind this site, nor other similar storage.  The data you enter is transformed on the fly and output back out.  We don't need a database to do that, so we don't have one.


Can't I do this in Excel with a formula?

Yes, you can.  As I said above there are other ways to acheive the same thing, some better than others in certain scenarios.  Using Excel may work for you, but in many cases I can think of, using this site is a bit quicker.


Can I have a copy of the code?

Sorry, this site is ©2015 UU3 Ltd, I'm sure if you really wanted you could work it out, it's not really rocket science.


How much does it cost to use this site?

It doesn't.  I put up the site because I use it, if you want to as well go ahead.  Providing you don't kill my server, or cost me money on my bandwidth, then I don't really mind you using it at all, whenever you need.  I hope advertising pays for the few bills I have.

Do you offer any guarantees or warranties?

  This site is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.


© 2012 UU3 Ltd | Disclaimer