Thank you Nigel for the suggestions. Agreed, but since this is just a standalone training env, and for now i only want to have a hands on REST development, i think assigning %All role should be fine to see the output of the code ! Security will be my next hands on once i am familiar with the REST architecture.

Yep. Select INTO works great if the source and target tables are in same NAMESPACE. I need to copy the data across namespaces, for which i  have already some another method. 

But i found that copying recordset would also work, since once the object is created i can easily write to another table on a different "NAMESPACE". Only issue is to write to a target table from a recordset i need to loop it and am not aware of a straightforward copy.

Thank you Robert. But looks like i am running into another issue where data is lost and i am unable to create table.

I really would prefer to find out if there is a way to copy directly a RecordSet to a table or any other faster method rather than looping through the entire Recordset.

Vitaliy, This is great !

The code works fine now. Appreciate your help and time.

I have to put some filters on the columns now, which i think i have to use the QueryInfo Object.

Thank you !


Jimmy Christian.

Hello Vitaliy,

Thank you for your time. This works good. Issue is that i only see the first page of the results.

Even after adding the tableNavigatorBar, it still shows only one page  and not all the results. I have more than 30,000 rows to display on the page. Let me know.



I cannot share globals on the namepsace i am working on.

Actually i was able to retrieve data from Namespace2  working on a callback method for recordset which the table  is using. But now issue is zenpage only shows the first page.

Will try to find out a reason why the page is hanging. It could be that i have to flip back to Namespace1 once i get the recordset.


Thanks Neerav.

I am referring to the zenpage call back methods, which are called on a zenpage event.

Problem is i cannot create any views in namespace2.

Thanks Neerav.

I still believe  we can do in the code by using a callback method. I am not sure how to use it.

Thanks John. This was helpful. I had to correct the password for that service.

Issue is resolved.

Thank you . This is perfect !

I just tweaked it little bit

s  ret=##class(%SQL.Statement).%ExecDirect(,.testingddl)