The select Tag
Description
The SQL SELECT statement
A method (only one really) to pull data from a SQL table to populate EDI elements.
Type: SQL
Attributes:
- fields
- table or view field list or an asterisk, when asterisk is used then the
table field names will be used as variable names.
- table
- SQL Table or View name
- where
- SQL where clause (optional)
- orderBy
- SQL order by clause (optional)
Loop Control: YES
Containing Tags - suggested
- atEnd
-
- commit
-
- delete
-
- dumpVariables
-
- if
-
- insert
-
- leave
- log
-
- rollback
-
- set
-
Used Within Tags - suggested
- connect
-
- continue
-
- envelope
-
- functionalgroup
-
- if
-
- loop
-
- segment
-
- table
-
- transactionset
-
Example
<select fields="firstName, secondName" table="pid" where="secondName='James'">
<segment id=...
<element position='1'>${firstName}</element>
</segment>
<atEnd>
<update table...
</atEnd>
</select>
To dump the contents of a query try this
<select fields="firstName, secondName" table="pid" where="secondName='James'">
${firstName}
${secondName}
</select>