HI all talkers,
Yesterday a i have found Tricky think with "Begins".
Can any one give me clear ideia on this.I know wht i happening but why it is happening i dont know. plz suggest on this.
Hear is the example
DEFINE TEMP-TABLE tt_cust
FIELD cust-no AS CHAR
FIELD custix AS LOGICAL
INDEX Icustno cust-no .
CREATE tt_cust.
ASSIGN
tt_cust.cust-no = "AFS"
tt_cust.custix = YES.
CREATE tt_cust.
ASSIGN
tt_cust.cust-no = "AFS01"
tt_cust.custix = YES.
CREATE tt_cust.
ASSIGN
tt_cust.cust-no = "AFS02"
tt_cust.custix = YES.
CREATE tt_cust.
ASSIGN
tt_cust.cust-no = "AFS03"
tt_cust.custix = YES.
FIND tt_cust WHERE tt_cust.cust-no BEGINS "AFS" NO-LOCK NO-ERROR.
MESSAGE AVAIL tt_cust AMBIG tt_cust
VIEW-AS ALERT-BOX INFO BUTTONS OK.
===============
ANS:- yes no
===============
BUT when u remove the index in the temp table i get the output as
===============
ANS:- no yes
===============
i was suprised to see this, i dont have clear idea of this why it is behaving like this.
Yesterday a i have found Tricky think with "Begins".
Can any one give me clear ideia on this.I know wht i happening but why it is happening i dont know. plz suggest on this.
Hear is the example
DEFINE TEMP-TABLE tt_cust
FIELD cust-no AS CHAR
FIELD custix AS LOGICAL
INDEX Icustno cust-no .
CREATE tt_cust.
ASSIGN
tt_cust.cust-no = "AFS"
tt_cust.custix = YES.
CREATE tt_cust.
ASSIGN
tt_cust.cust-no = "AFS01"
tt_cust.custix = YES.
CREATE tt_cust.
ASSIGN
tt_cust.cust-no = "AFS02"
tt_cust.custix = YES.
CREATE tt_cust.
ASSIGN
tt_cust.cust-no = "AFS03"
tt_cust.custix = YES.
FIND tt_cust WHERE tt_cust.cust-no BEGINS "AFS" NO-LOCK NO-ERROR.
MESSAGE AVAIL tt_cust AMBIG tt_cust
VIEW-AS ALERT-BOX INFO BUTTONS OK.
===============
ANS:- yes no
===============
BUT when u remove the index in the temp table i get the output as
===============
ANS:- no yes
===============
i was suprised to see this, i dont have clear idea of this why it is behaving like this.