Behaviour of Find statement

sekarv018

New Member
Hi,
I have hit a peculiar scenario with the find statement which cannot be explained.

Scenario:
I have statement with find which i use to find out the ambiguity of a record.
Suppose i have two customers with custnum = 394980 and custnum = 39498091
Now my query reads
Find customer where custnum begins "394980" no-lock.
This should give me an error because it should find two records (as expected).
Now i have two regions one is a test region and other is a local region.
Both of them have the same data.....
It is throwing an error in the test region (which is as expected) but does not in the local region...and i fail to understand why...
Although in my local region if i remove the 0 from the query it starts throwing an error....
Can this be explained ? all your help would be appreciated.
Please note both the regions are in 9.1 E
 
please double check following with the local db

1. Index rebuild (May be index corrupted)
2. No-error is using with the Find statement ?
3. Data is same ?

Regards
Philip P oommen
 

sekarv018

New Member
hi,

Yes i have doubly checked.

1) data is same.
2) i am not using no-error is because i want to see the error.
3) i am not sure about index corruption....but i do not think it is the case because i tried upating the same record it worked well....moreover
on removing the last 0 it works as expected (it gives me an ambiguity error).

Thank you,
Sekar
 
May be ur issue is related to the following :-

If there is a one exact match, even though it is a substring of
another match, then it is considered a unique hit. It will NOT be
considered AMBIGUOUS. Consider the following example:
FIND testfile WHERE a = '1' AND b BEGINS '1234'.
If there are records in the database where
record1.a = 1 and record1.b = '1234'
record2.a = 1 and record2.b = '1234 p'
Then record1 will be returned as a unique hit (AMBIGUOUS will be
false).
It is a feature of Progress that if there is one exact match it will
be returned and not considered a unique hit.
However, if you were to change the query as follows then it will be
ambiguous:
FIND testfile WHERE a = '1' AND b BEGINS '123'.

Regards
Philip P oommen
 

sekarv018

New Member
Hi ,

Thanks for your response......

Even i was under the same impression which you quoted just now..but then i am not able to digest the fact that it is returning an error in the test region.....and not in the local region....

Regards
Sekar
 
Top