views:

46

answers:

1

Possible Duplicate:
concatenating string

I posted a similar question earlier and asked about using SQL server to output the result with a single quote. Could someone edcuate me please?

select ' ' + CustomerID + ',' 
  from dbo.Customers 

customerid 
------------
ALFKI, 
ANATR, 
ANTON, 
AROUT, 
BERGS,

Would like to see the result as

customerid 
-----------
'ALFKI', 
'ANATR', 
'ANTON', 
'AROUT', 
'BERGS', 

so on...

+1  A: 
select '''' + CustomerID + ''',' 
  from dbo.Customers 
Martin