Comments
1 comment
-
It doesn't look like this is possible currently.
Can you please post this suggestion on the SQL Prompt uservoice forum: https://redgate.uservoice.com/forums/94413-sql-prompt ?
That forum is monitored by the Product Management team who use it as an important source when deciding what features to add or enhance in the tool.
Add comment
Please sign in to leave a comment.
SELECT CASE
WHEN Col = 1
THEN 'Col 1'
ELSE ''
END + CASE
WHEN Col = 2
THEN 'Col 2'
ELSE ''
END + CASE
WHEN Col = 3
THEN 'Col 3'
ELSE ''
END + CASE
WHEN Col = 4
THEN 'Col 4'
ELSE ''
END AS ConcatStr
FROM #Test;
But what I'd like to get is:
SELECT CASE
WHEN Col = 1
THEN 'Col 1'
ELSE ''
END
+ CASE
WHEN Col = 2
THEN 'Col 2'
ELSE ''
END
+ CASE
WHEN Col = 3
THEN 'Col 3'
ELSE ''
END
+ CASE
WHEN Col = 4
THEN 'Col 4'
ELSE ''
END AS ConcatStr
FROM #Test;
Is this possible? If not I'd like to submit a feature request.
Thanks.