Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 27 DEC 2004 03:17:58PM Mike O'Neal wrote:

Hello all - I’m getting bad results with SELECT and LIST statements on an indexed field, could use some help. Background is as follows:

1) Multi-value symbolic field with a btree index installed.

2) Key field that is VARCHAR(6), right-justified to 6 characters.

3) OI 4.1.3, XP workstation.

The record key is *not* part of the mv symbolic field.

If a user creates a record with a key that is longer than 6 characters, any subsequent SELECT or LIST command against the MV symbolic field returns truncated and just plain non-sensical record keys. It also returns the wrong number of expected keys.

However,

a) If I remove the btree index, the SELECT/LIST works fine against the MV field

b) If I leave the btree on and make the key field at least as long as the longest key, the SELECT/LIST works fine

c) Separate code written to do a btree.extract works fine on the mv field, even if the key is longer than six characters.

So, there seems to be some kind of relationship between the length of the key and the btree index. Have duplicated the problem in both RLIST and S/LIST. Any thoughts?

TIA,

Mike O.


At 27 DEC 2004 05:44PM Matt Sorrell wrote:

Mike,

You hit the nail on the head. At least in ARev, the definition in the dictionary for the key field must be at least as wide as any key-field text, PLUS any delimiters (if you have a multi-part key).

What I had to do in our system was expand my keyfield width definition to the longest value ever entered, plus a safety pad.

I haven't had any issues since.

msorrel@greyhound.com

Greyhound Lines, Inc.


At 27 DEC 2004 05:55PM Donald Bakke wrote:

Mike,

So, there seems to be some kind of relationship between the length of the key and the btree index. Have duplicated the problem in both RLIST and S/LIST. Any thoughts?

Yes, there is a relationship which has been documented for quite some time. Here's a post from when Aaron Kaplan was still with Revelation about this.

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 28 DEC 2004 11:05AM Mike O'Neal wrote:

Thanks Don and Mike.

Mike O.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/b4e6fe23cc8ac45c85256f77006f8269.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1