Always use the fully qualified name of the table, including both the SQL schema name and table name, as in:
Where MyApp is the SQL schema name and PatientTable is the table name.
The contents of the <sql> element must contain a valid embedded SQL SELECT statement.
It is convenient to place the SQL query within a CDATA block so that you do not have to worry about escaping special XML characters.
Any tables listed in the SQL query’s FROM clause must either be stored within the local InterSystems IRIS database or linked to an external relational database using the SQL Gateway.
Within the INTO and WHERE clauses of the SQL query, you can refer to a property of the source or target object by placing a : (colon) in front of the variable name. For example:
SELECT Name INTO :target.Name
WHERE SSN = :source.SSN AND City = :source.Home.City
Only the first row returned by the query will be used. Make sure that your WHERE clause correctly specifies the desired row.