query
Export the data specified by the SQL query.
- Note
- The query option is only availabe for type options XML and CSV. The output will be placed, by default, in a \opt_output file named <dbname>_query.sql.
- Example
The following is an export of the NAME and PHONE from the BOOKSHOP database PATRON table:
optString
= "query=select name, phone from patron where phone is not null"
- Results
The BOOKSHOP_query.csv file results will be:
"Bruce Wayne", "225-522-8626"
"Warren Buffett", "888-395-6349"
"Chatsworth Osborne Jr.", "856-222-1963"
"Carlos Slim Helu", "744-555-1732"
"Giorgio Armani", "05-23-611-1934"
"Jed Clampett", "310-999-0111"
"Stephen Jobs", "408-996-1010"
"Richie Rich", "619-555-2011"
"Scrooge McDuck", "714-781-4565"
- Note
- By default, exports using the query option will be in CSV format. XML format can be selected optionally. The SQL format cannot be selected since there is no guaranty the query results will match a known schema layout.