The TABLEDB function outputs the results of a database query.
If the query results in the output of a single field's data, this data is cast to an appropriately similar data type. For example, a VARCHAR is cast to a String.
If the query results in the output of multiple fields, the data is separated by the specified Delimiter
and output as a single String.
Input | Data Type | Description |
---|---|---|
InputN | All | Data |
Output | Data Type | Description |
---|---|---|
Output1 | All | The query result. |
Name | Property Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Connection | String |
Specifies the ASMC(ASTERIA Server Management Console) defined connection to use to connect to the database. |
||||||||||||
SQL | String |
The SQL query statement. Use the Java PreparedStatement, using the question mark ("?") to locate where field names are to be inserted in the statement. For example, if the TABLEDB function's SQL property statement is defined as "select field2 from tablename where field1=?", this function component's first input will be inserted in the statement in place of the question mark ("?") and then used to query the database. Multiple keys can be defined in a statement. An example of a statement using multiple keys is "select field2 from tablename where field1=? and field3=?". In this case, the TABLEDB function requires two inputs, with each input replacing their respective question mark ("?") in the statement. Similarly, a statement such as "select * from tablename" that does not require any inputs can be used. If the number of inputs does not match the number of question marks ("?") in the statement, a bind error will occur resulting in an Exception. |
||||||||||||
Delimiter | String | The delimiter used to separate multiple field data resulting from a query. | ||||||||||||
Zero Record | choice | Specifies the result to be returned if no matching data is found:
|
||||||||||||
More records | choice | Specifies how result data is returned if a query results in multiple records:
|
||||||||||||
DefaultValue | String |
The default value to be output when |