Replies: 1 comment
-
Hi @moraja - I put together a sample for this scenario - https://github.com/dzsquared/scriptdom-parse-sample There's both the ability to get the initial query with parameters and the query with the values substituted. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm looking for help identifying how I can parse a query like this one :
declare @p0001 nvarchar(73) set @p0001 = N'UPDATE session SET ss_last_used = @LastUsed WHERE ss_sequence = @sequence' declare @p0002 nvarchar(32) set @p0002 = N'@LastUsed datetime,@sequence int' declare @P0003 datetime set @P0003 = '20240305 15:53:09.093' declare @P0004 int set @P0004 = 9482 exec sp_executesql @p0001, @p0002, @LastUsed = @P0003, @sequence = @P0004
to extract the statement being executed , I'm wondering if there is a direct way to extract this info without having to inspect the code.: "UPDATE session SET ss_last_used = @LastUsed WHERE ss_sequence = @sequence "
Beta Was this translation helpful? Give feedback.
All reactions