Skip to content

Query Syntax

doublefint edited this page Jun 6, 2018 · 5 revisions

Full syntax example

Query ListEmployees(City As %String = "") As %SQLQuery 
(ROWSPEC="ID:%Integer,Name:%String,Title:%String", CONTAINID = 1) 
[SqlProc, SqlName=MyProcedureName] 
{
SELECT ID,Name,Title FROM Employee
 WHERE ( Home_City %STARTSWITH :City )
 ORDER BY Name
}

Where:

Query - query keyword, required

ListEmployees - query name, required

(City As %String = "") - query arguments list, optional

As %SQLQuery - query type, required

(ROWSPEC="ID:%Integer,Name:%String,Title:%String", CONTAINID = 1) - query params list, optional

[SqlProc, SqlName=MyProcedureName] - query properties list, optional

Clone this wiki locally