Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: SQL directives  (Read 11215 times)
Paul S.
Posts: 45


« on: August 03, 2010, 03:12:22 pm »

Since Informix Dynamic Server 7.3X you have been able to use SQL directives like

SELECT {+INDEX(incident_details id_u1) AVOID_FULL(incident_details)}
id_case , id_in_case, id_status, id_reserve_amt
FROM incident_details
WHERE id_in_case  = g_in.in_case
AND   id_status   = l_id.id_status

This works fine using "dbaccess"

Two questions.
1. Can we use this format with Genero 2.XX
2. If the statement is PREPAREd does Genero check/changed anything or just pass the statement to the backend.

Thanks

Paul
Sebastien F.
Four Js
Posts: 545


« Reply #1 on: August 03, 2010, 03:56:34 pm »

Yes you can use optimizer hints with Dynamic SQL (PREPARE, EXECUTE IMMEDIATE).

However, with Static SQL, {} are treated as 4gl comments and are removed by fglcomp.

Try fglcomp -S to extract Static SQL statements.

Seb
Paul S.
Posts: 45


« Reply #2 on: August 03, 2010, 03:59:14 pm »

Thanks.

Paul
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines