Written by

Question Gautam Rishi · Jul 27, 2023

Get sql statement that has been in executed by %ResultSet or %Library.ResultSet

Hi all,

I am using %Library.ResultSet to execute my query which I have something like this.
Query GetABC() As %SqlQuery [SqlProc]{

}

After I execute this query and a resultset it returns from this. Now What I want to know is the SQL statement which will have the values dynamically added into while execution.

Product version: IRIS 2023.2

Comments

Eduard Lebedyuk · Jul 28, 2023

I don't think there's a way to do that, but calling @Benjamin De Boe - maybe he has an idea.

Also you can GetABC Query text using %Dictionary.QueryDefinition class.

0
Joel Solon · Jul 31, 2023

%Library.ResultSet (aka %ResultSet) is deprecated. You should switch to using %SQL.Statement instead. It's better in every way. Doc is here: Dynamic SQL and within that there's a section on Metadata.

0