Dbquery

Queries data from an external database.

Usage

dbquery (query, connect-string : outdata)

query is a relation with one tuple that contains the query.

Details

Queries the database reachable through connect-string, in a schema accessible by user via password, with query. Results are contained in outdata.

Notes

Known Bugs

Example

Using the input:
      RELATION query: dummy char
      select title, author, pages from book where pages > 200
    
when executing the plan:
      PLAN test
      {
       INPUT: stream books
       OUTPUT: stream result
      
       BODY
       {
         dbquery (query, "jdbc:oracle:thin:@mydb!scott!tiger" : result)
       }
      }
    
will generate the output:
      ----------------------------------------------
      RELATION: udbquery1_result
         attrs: title, author, pages
      ----------------------------------------------
      Title3|Author2|733
      Title5|Author2|1152
      Title2|Author2|479
      ----------------------------------------------