Hello Community,
I executed the below query in the %ZLANGC00.mac routine. It returns results when using dynamic SQL, but not with embedded SQL(returns 0).
&SQL(SELECT count(*) INTO :Cnt FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'")
Write "SQL Table count : "_Cnt,!
Set tResultSet = ##class(%SQL.Statement).%ExecDirect(,"SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'")
Do tResultSet.%Display()Thanks!
.png)
.png)
