It's one of the pain that non-English language web designers comprehend:
Imagine I have a cell that it's value is '450\k\200', as you see k is placed in between since it's an English character but if it's '450\ک\200' the non-English ک character is shown in the right which is a problem about non-English languages.
I can apply a trick and insert it inside table, tr, td tags like this:
<table><tr>
<td>450\</td><td>ک</td><td>\200<td>
</tr></table>
which works.
The question is about the query, how can I split text by \ character then implement related tags as the format I just mentioned?
I thought something like following can be used:
SELECT STRING_AGG( (SELECT value FROM STRING_SPLIT ( '450\k\200' , '\' )) , ',')
But I get the error saying:
Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
How can I deal with this weird problem? I appreciate if you suggest any trick other than table tag, I even tried pre or code tags but even it didn't resolve the problem.
SELECT STRING_AGG(value, ',') FROM STRING_SPLIT('450\k\200', '\' ). Note, thatSTRING_SPLITdoesn't quarantee the order of the substrings.table,trandtdtags when I want to show it manually, but the question is about when it's populated by the query result, how to change the query result so that the cell value be formatted as I mentioned?table,trandtdtags then?