Skip to content
Advertisement

SQL: How to add string text to my CTE output

I’ve a SQL question. I want to add a text value to the front of the JSON result of my view. I am now able to display the results of my view as JSON and then return with the “SELECT * FROM @TABLE” as the result.

I need this return query for my ETL process.

The output of my CTE now is:

The result I want to have is:

What I’ve now:

Advertisement

Answer

I might be oversimplifying this, but why not just concatenate the beginning of the string to your resulting column?

That is, replace the final:

With:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement