To create an SQL query
 
          
         
          
            	 
             
               		
               - Start the OpenESQL Assistant. 
                  		
               
- Connect to a data source. 
                  		
               
- On the tree view, check the box next to a table name. 
                  		
               
- On the Select Type of Query to Create dialog box, click a query type from the list. 
                  		
               
- Check 
                  		  Generate query with FOR UPDATE (SELECT or SELECT DISTINCT queries only) to generate a FOR UPDATE clause in the query. Optional. 
                  		
               
- Check 
                  		  Generate query with WHERE CURRENT OF (UPDATE or DELETE queries only) to generate a WITH CURRENT OF clause in the query. Optional. 
                  		
               
- Click 
                  		  OK. The query code appears on the 
                  		  Query tab. 
                  		
               
- Add tables, columns, search criteria, and auxiliary code to the query as necessary.