[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: How to use HINT statement in SQR ?
begin-sql
select distinct /*+ALL_ROWS*/ pa.business_unit,
pa.contract_num_pc,
pa.contract_line_num .... blah blah blah
end-sql
should work
-----Original Message-----
From: Rick_Creel@AONCONS.COM [mailto:Rick_Creel@AONCONS.COM]
Sent: Friday, July 13, 2001 1:47 PM
To: SQR-USERS@list.iex.net
Subject: How to use HINT statement in SQR ?
I am trying use a HINT in an SQR select. The only way I could get it to be
accepted syntax-wise was to code the statement like this:
begin-select distinct on-error=sql_error
/*+ALL_ROWS*/
pa.business_unit &pa.business_unit
pa.contract_num_pc &pa.contract_num_pc
pa.contract_line_num &pa.contract_line_num
cl.eff_status &cl.eff_status
cl.effdt &cl.effdt
do process_stuff
from ps_proj_activity pa,
ps_pc_contract_lin cl
where pa.business_unit = $req_business_unit
and pa.project_id = $req_project_id
and blah blah blah
end-select
When SQR parses out this command, it becomes:
select distinct /*+ALL_ROWS*/ pa.business_unit,
pa.contract_num_pc,
pa.contract_line_num .... blah blah blah
However, in order for it to work properly, it needs to be parsed as:
select /*+ALL_ROWS*/ distinct pa.business_unit,
pa.contract_num_pc,
pa.contract_line_num .... blah blah blah
Anyone know how to make this happen? I have tried many different versions
of
the BEGIN-SELECT statement,
but the only one I could get to work was the one shown above.
Any help would be greatly appreciated!