Select
The SQLXML Select structure is a very basic SQL query, phrased in a generic XML structure. It looks like this:
<sql:Select as="RecordSetName" into="RecordName"> <tablename nameInDB="somename.tablename"> <columnname key="true">value</columnname> <columnname /> <columnname /> </tablename> </sql:Select>
The “as” attribute in the Select element tells the SQLXML the name of a variable to save the results into; SQLXML is declarative in nature, so once you’ve saved the results of an operation into a variable, you can’t modify the contents of that variable later. (You can, however, specify subvariables; we’ll get into that later on in the document.)
The “into” attribute in the Select element tells the SQLXML the name of the record within that variable to save the results into; this isn’t important right now, we’ll get into it more in the XMLOut operation.
Tablename specifies the basic tablename; if it’s necessary to qualify the tablename, this is done in the “nameInDB” attribute.
columnname specifies each of the columns that are either to be utilized or to be called back; specifying a column as a “key” field sets it up to expect a value, which then becomes the Where clause of the operation.
For more complex logic, see the SQLXML Execute function.