What are the challenges you face when working across database platforms? Take the survey

BUG: InlineEXEC incorrectly treats $text$ as a substitution

mbraymbray Posts: 9 Bronze 1
edited July 3, 2021 2:12AM in SQL Prompt
If a procedure has code that includes $text$ (where 'text' is any word) then the Inline EXEC function incorrectly treats this value as a substitution, removing the $'s and highlighting the text.

USE tempdb;<br><div>CREATE PROCEDURE TestRG</div><div>AS</div><div>BEGIN</div><div>&nbsp; &nbsp; SELECT 'This is a $BAD$ example'<br></div><div>END<br></div><div>GO</div><div></div>
Then run the 'Inline EXEC' feature on this statement:
EXEC TestRG&nbsp;
The result will be:
<div>BEGIN</div><div>&nbsp; &nbsp; SELECT 'This is a <b>BAD</b> example'<br></div><div>END</div>

Sign In or Register to comment.