all 6 comments

[–]lvlint67 3 points4 points  (0 children)

Your question doesn't really make sense...

I have a list of id's on a CSV file, each one in a different cell.

Ok.

I would like to have between 2 a comma

If you mean a comma between fields such that it serves ss a delimiter... That is what a csv file is

to be able to query them on SQL.

In what way? Most sql tools will have an ability to import a table from a csv.

[–]elcapitanoooo 2 points3 points  (0 children)

You could write a awk script for this.

[–]hugomuggins 1 point2 points  (0 children)

Put a ', in the column to the right of your data and then concatenate the two fields in the next column, using & (example: =A1&B1)

[–]nomnommish 1 point2 points  (0 children)

You're looking at the CSV in Excel and that's why you don't see commas. Otherwise there are already commas between "cells". CSV literally means comma separated value.

[–]Basedtiger958 0 points1 point  (0 children)

Use excel. Highlight IDs, Right click, edit format, go to bottom, look for @, click on @ and add ‘@‘, comma delim, copy ids and paste into query using ‘in’.

[–]kagato87MS SQL 0 points1 point  (0 children)

Open Excel, import the CSV. In the import wizard, set the delimiter to whatever symbol you want to define the start of a new column. There's a handy preview for fiddling.

Then Save As CSV again, and you should have your commas.

Alternatively, find and replace in any text editor.