Creating a query

You can only create a query by using a detailed specification file.

Use the syntax shown in Specification-file conventions to create a query.

Use the following syntax to create a specification file for a query:
BEGIN OBJECT QUERY queryname 
# Compulsory Attributes 
PROJECT projectname 
DATABASE targetdatabasename 
SELECTSTATEMENT sql_statement 

END OBJECT  
The following table lists the attributes and their values.
Attribute Attribute value
queryname Query name
projectname Name of an existing project
sql_statement SQL SELECT statement, in quotation marks, that contains unload criteria
targetdatabasename Name of the database that the records will be loaded or unloaded to