You may create an SQL PROCEDURE to serve your needs:
CREATE PROCEDURE %Z.NSPACE() RETURNS VARCHAR
Language ObjectScript
{
set (%,%r)=""
for set %=$o(^|"%SYS"|SYS("CONFIG","CACHE","Namespaces",%)) quit:%="" set %r=%r_%_";"
quit %r
}and it runs like this, assuming you have access to Namespace %SYS
USER>do $system.SQL.Shell()
SQL Command Line Shell
----------------------------------------------------
The command prefix is currently set to: <<nothing>>.
Enter q to quit, ? for help.
USER>>select %Z.NSPACE()
3. select %Z.NSPACE()
Expression_1
%ALL;%SYS;DOCBOOK;SAMPLES;USER;
1 Rows(s) Affected
statement prepare time(s)/globals/lines/disk: 0.0006s/5/160/0ms
execute time(s)/globals/lines/disk: 0.0005s/6/425/0ms
cached query class: %sqlcq.USER.cls4
---------------------------------------------------------------------------
USER>>- Log in to post comments
