JSqlParser
JSqlParser copied to clipboard
Support for TSQL "STUFF" and "FOR XML PATH" instructions
Hi,
The following TSQL statement seems not to be supported by JSqlParser (v.0.9.6)
SELECT
(
STUFF(
(SELECT '|' + person_name
FROM person
JOIN person_group ON person.person_id = person_group.person_id
WHERE person_group.group_id = 1
FOR XML PATH(''), TYPE).value('.', 'varchar(max)')
,1,1,'')
) AS person_name
Such statement is usually used to concatenate multiple rows in a single one
https://msdn.microsoft.com/en-us/library/bb510462.aspx https://sqlandme.com/2011/04/27/tsql-concatenate-rows-using-for-xml-path/
Is there any chance for the "FOR XML PATH" and "STUFF" instructions to be supported by JSqlParser ?
Thanks !
Bump.
tbrielle, did you notice any other T/SQL parsing issues? I am getting parsing errors on Declare, SET, Exclude, IF, and a few more. I have a large repository of code to parse. The parser did about 60% of the work, but I am stuck with the 40%.
see #479 as well