Replies: 3 comments 1 reply
-
Yep, I'll look into it. I can't offhand remember how deeply implemented "for xml path" is, and I don't remember "path" having options, so that may be the issue there. I would expect the rest to work as is. |
Beta Was this translation helpful? Give feedback.
-
I've confirmed the issue and narrowed the problem down to a very simplistic current implementation inside the FOR clause parser. I should be able to resolve this within a few days. |
Beta Was this translation helpful? Give feedback.
-
Please verify that it's fixed in https://www.nuget.org/packages/TSQL.Parser/2.5.0. |
Beta Was this translation helpful? Give feedback.
-
Hi Bruce,
I am sorry for "always" throwing hard questions at you. This tool is wonderful and I have been using it since last year.
Just now, I met a complex query which contains a STUFF function, and inside the function, the first parameter is a SELECT statement to generate some texts. It looks like the below statement.
select stuff ( (select top 10 note from asset_note where note is not null order by note_id for XML path('')) , 1 , 1 , 'Note: ' );
My C# code looks like this:
If the script is simple like this:
SELECT STUFF('SQL Tutorial', 1, 3, 'HTML')
It can be parsed successfully.
Could you please look at this issue to see if it is possible to embed SELECT inside the STUFF function?
It is valid SQL to use SELECT inside STUFF.
Regards
Paul
Beta Was this translation helpful? Give feedback.
All reactions