sql server - Add single quotes to results in a column from a SQL query -
so have following sql:
select opportunities.ref opportunities group opportunities.ref
which returns following results:
op10 op252 op52905 op42
i trying achieve following:
'op10' 'op252' 'op52905' 'op42'
i have tried following:
select opportunities.ref opportunities case when opportunities.ref not null "'"+opportunitiesref+"'" group opportunities.ref
but not work.
i not want update column, or use @declare functions this. using sql server 2008. im not sure how go this. help?
if using sql server modify query according below :
select opportunities.ref opportunities case when opportunities.ref not null ''''+opportunitiesref+'''' group opportunities.ref
Comments
Post a Comment