Developer technologies | Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I need the below output. Please provide a query for this.
Output
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Answer accepted by question author
SELECT CASE WHEN charindex('{', col) > 0
THEN substring(col, 1, charindex('{', col) - 1)
ELSE col
FROM tbl
The query simply removes all text that comes after the first left brace (and the brace itself), no matter whether this brace is matched by a right brace or not.