I want to retrieve some part of given string.
Here is the following example for the string:
Example: In SQL Server
Declare @Names varchar = 'H1,H2,H3,'
SELECT STUFF(@Names,1,CHARINDEX(',',@Names,0),'');
After referring this : 'stuff' and 'for xml path('')' from SQL Server in Postgresql.
String_agg
can't help me for this scenario.