Subject [IBO] Another parameter example
Author Paul Hope
Hi

Heres another example of parameter values getting in a twist

select * from CUSTOMER where
CO=? /* CO */ and
Account_no>=? /* ACMIN */ and
Account_no<=? /* ACMAX */ and
((-1=? /* LA */ )or(LINK_AC=? /* LA */ )) and
(('?'=? /* BG */ )or(BUYING_GROUP=? /* BG */ )) and
(('?'=? /* OC */ )or(TERMS=? /* OC */ )) and
(('?'=? /* VC */ )or(VAT_CLASS=? /* VC */ )) and
(('0'=? /* STOP */ )or(L>0)) and
(('0'=? /* PROB */ )or(P>0))and
(f_striptime(CREATED) between ? /* ADMIN */ and ? /* ADMAX */ )and
(f_striptime(LAST_CHANGE) between ? /* SDMIN */ and ? /* SDMAX */ )and
((0=? /* REPMIN */ )or(REP_AREA_CODE>=? /* REPMIN */ ))and
((0=? /* REPMAX */ )or(REP_AREA_CODE<=? /* REPMAX */ ))and
(('A'=? /* BK */ )or(STATUS=1))
ORDER BY account_no ASC

PLAN (CUSTOMER ORDER RDB$PRIMARY21)

FIELDS = [ snip ]
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 21446788
STMT_HANDLE = 21455072
PARAMS = [ Version 1 SQLd 22 SQLn 22
[CO] = 'A'
[ACMIN] = 3000
[ACMAX] = 9999
[LA] = -1
[LA] = -1
[BG] = '? '
[BG] = '? '
[OC] = '?'
[OC] = <NULL>
[VC] = 'H'
[VC] = <NULL>
[STOP] = '0'
[PROB] = '0'
[ADMIN] = '01 Jan 1900'
[ADMAX] = '01 Jan 2200'
[SDMIN] = '01 Jan 1900'
[SDMAX] = '01 Jan 2200'
[REPMIN] = 0
[REPMIN] = 0
[REPMAX] = 0
[REPMAX] = 0
[BK] = 'A' ]
----*/

For some reason the second occurence of OC and VC are NULL whereas other seamingly similar parameters are OK.

Regards
Paul


[Non-text portions of this message have been removed]