Salesforce

How to use NOEXECUTE with SQL-92?

« Go Back

Information

 
TitleHow to use NOEXECUTE with SQL-92?
URL NameP95263
Article Number000141464
EnvironmentProduct: Progress
Version: 9.1D09, 9.1E
Product: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Other:
Question/Problem Description
How to use NOEXECUTE with SQL-92?
How to view SQL engine optimization of query statement?
How to obtain SQL query optimization plan without executing query?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
NOEXECUTE is used to obtain optimization query plan without running the SQL query.

Progress 9.1D requires 9.1D09 to use the NOEXECUTE statement.

1. Create and run SQL QUERY with NOEXECUTE

Example:
 
select * from pub.customer NOEXECUTE;

2. To view query optimization plan run the following:
 
select "_Pnumber", substring ("_Description",1, 80)
from pub."_Sql_Qplan"
where "_Pnumber" = (select max("_Pnumber")
from pub."_Sql_Qplan"
where "_Ptype" > 0);

3. The query plan for the SQL query outlined in Step 1 against the sports2000 database customer table, appears as follows:

_Pnumber substring(_Description,1,80)                                                    
-------- --------------------------------------------------------------------------------
       3 SELECT COMMAND.                                                                 
       3 PROJECT [60] (                                                                  
       3 |   PROJECT [58] (                                                              
       3 |   |   PUB.CUSTOMER. [0](                                                      
       3 |   |   |   TABLE SCAN                                                          
       3 |   |   )                                                                       
       3 |   , PUB.CUSTOMER.CustNum                                              
       3 |   , PUB.CUSTOMER.Name                                                         
       3 |   , PUB.CUSTOMER.Address                                                      
       3 |   , PUB.CUSTOMER.Address2                                                     
       3 |   , PUB.CUSTOMER.City                                                         
       3 |   , PUB.CUSTOMER.State                                                        
       3 |   , PUB.CUSTOMER.Country                                                      
       3 |   , PUB.CUSTOMER.Phone                                                        
       3 |   , PUB.CUSTOMER.Contact                                                      
       3 |   , PUB.CUSTOMER.SalesRep                                                     
       3 |   , PUB.CUSTOMER.Comments                                     
       3 |   , PUB.CUSTOMER.Name                                                         
       3 |   , PUB.CUSTOMER.Address                                                      
       3 |   , PUB.CUSTOMER.Address2                                                     
       3 |   , PUB.CUSTOMER.City                                                         
       3 |   , PUB.CUSTOMER.State                                                        
       3 |   , PUB.CUSTOMER.Country                                                      
       3 |   , PUB.CUSTOMER.Phone                                                        
       3 |   , PUB.CUSTOMER.Contact                                                      
       3 |   , PUB.CUSTOMER.SalesRep                                                     
       3 |   , PUB.CUSTOMER.Comments                                                
       3 |   , PUB.CUSTOMER.CreditLimit                                                  
       3 |   , PUB.CUSTOMER.Balance                                                      
       3 |   , PUB.CUSTOMER.Terms                                                        
       3 |   , PUB.CUSTOMER.Discount                                                     
       3 |   , PUB.CUSTOMER.PostalCode                                                   
       3 |   , PUB.CUSTOMER.Fax                                                          
       3 |   , PUB.CUSTOMER.EmailAddress                                                 
       3 |   )                                                                           
       3 , PEXPR1                                  
       3 , PEXPR2                                                                        
       3 , PEXPR3                                                                        
       3 , PEXPR4                                                                        
       3 , PEXPR5                                                                        
       3 , PEXPR6                                                                        
       3 , PEXPR7                                                                        
       3 , PEXPR8                                                                        
       3 , PEXPR9                                                                        
       3 , PEXPR10                                                                   
       3 , PEXPR11                                                                     
       3 , PEXPR12                                                                       
       3 , PEXPR13                                                                       
       3 , PEXPR14                                                                       
       3 , PEXPR15                                                                       
       3 , PEXPR16                                                                       
       3 , PEXPR17                                                                       
       3 , PEXPR18                                                                

The Progress / OpenEdge SQL-92 engine does not accept SQL queries that are terminated with a semicolon ";"
For ODBC clients, and reports a syntax error when using the ODBC driver,  the ";" is valid for SQL queries from JDBC connections.
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:37 AM

Powered by