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

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

python - Error: Unresolved reference 'selenium' What is the reason? -

php - Need to store a large amount of data in session with CI 3 but on storing large data in session it is itself destorying automatically -