I used COALESCE with LIKE in my query:

WHERE Column1 LIKE '%' + COALESCE('Togas', Column1) + '%'

apparently the rows with "[" and "]" characters are excluded from query result. is it possible to include those rows in the result? thanks in advance!

COALESCE('Togas', Column1) will always return 'Togas' thus Column1 will never be called. But to answer your question you need to escape the control characters:

COALESCE('Togas', Replace(Replace(Column1, '[', '[['), ']', ']]'))

There are also other LIKE operators you should take in to consideration. There is an ESCAPE claused but it only lets you escape a single character

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.