SQLTeam.com | Weblogs | Forums

Add a column to display a string "Yes" in SQL

#1

Hello, i have a report in Report Builder 3.0. I just want to add a column that is not associated to any field in the report. All the items in that field must be just a string of characters like "Yes" or anything. Please help.

#2

how would you determine the value "Yes" or anything ?

#3

I wanna fill all that column with "Yes". The information there is from a separate point of view, not in the SQL tables, as i explained above. So don't worry about that.

#4

You can just add the desired word as new column to your existing query.

select column1,
column2,
column3,
'Yes' as column4
from your table

1 Like
#5
Like this?

SELECT DISTNCT table.column1,
table.column2,
table.column3,
table.'Yes' as column4
FROM table

#6

no need to put table name prefix just keep 'Yes' as column4

1 Like
#7

Thank you, it worked. How do i mark this as an answer?