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 -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -