{{tag>category:"OpenInsight 32-Bit" author:"Matthew Jones" author:"Paul Marraffa"}} [[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]] ==== Btree index problem (OpenInsight 32-Bit) ==== === At 22 OCT 2008 08:07:49AM Matthew Jones wrote: === Data field, VARCHAR(10) with btree index on it. Two records, values in that field "400.02" and "400.020". The btree indexes are being stored together!! If I select or btree.extract using "400.02" I get both sets of records. If I select or btree.extract using "400.020" I get nothing! The obvious guess is that the index routine is treating these two values as identical numeric values and then storing the index values together. The field is defined as VARCHAR with no oconv / iconv etc. Anyone please suggest the best way to get the btree indexes to distinguish between the two?? Any ideas? This is quite critical - these are ledger account numbers so are definitely not to be considered as numeric and identical. Not sure why I haven't come across this before - behaviour is same in OI 8.0.3 and AREV v3.12! Thanks. Matthew Jones. ---- === At 22 OCT 2008 04:48PM Paul Marraffa wrote: === Your strings are treated as numbers. Not easy to get around, look at padding the string with an Alpha. This is the opposite of using addition on a string to resolve to a number. ie...Java I stopped using "." in ledger numbers years ago, replaced them with mandatory fixed length codes, stored as numbers. NUMCONV 1010.010=Q1010.010 1010.01 =Q1010.01 FIXED 1010.010=10100100 1010.01 =10100100 See this http://www.revelation.com/__85256DB80017688B.nsf/0/F67921F0B4302EC085256D0F00540C48?OpenDocument [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=58F0E0489AB39764852574EA0042A241|View this thread on the Works forum...]]