Strange Problem
Nancy Palmquist
nlp at vss3.com
Fri Apr 1 12:09:51 PST 2005
Rick Mitchell wrote:
> I have two fields:
>
> 29 Date of transaction 8 yymd
> 30 Serial # of transact 9
>
> I have an index built on Field 29
>
> File is called mbien04p
>
> I am importing new data.
>
> I get field 29 and 30 from the raw data.
>
> I do a lookup to the file
>
>
> lookup test=mbien04p k=29 i=h -nx
>
> I will have data in field 29, i.e. 20040626 and when I do a lookup to it it
> fails.
>
> Do I need to use these as integers instead of date edits?
>
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
Critical to a lookup to an index built on a date would be:
1. Index is built on the entire date field - not more or less
characters. If you want the index to also sort the data in field 30 it
should be the second sort level not included in the first.
2. The KEY to the lookup should also be a field with the same date edit
as the indexed field. 29 has the edit (yymd,8)
lookup test=mbien04p k=29 i=h -nx
3. since you said import, I am guessing you are sitting on a record in
the current file and doing the lookup to the same file, remember that
the record you are sitting on may be in the index and you may look at
yourself and not other instances of field 29.
To avoid that, do the import from @once or @done, and post all data to a
live record --- Or do it from a qualfier with one record and post to the
main key. Both ways will keep you out of the index.
Nancy
--
Nancy Palmquist MOS & filePro Training Available
Virtual Software Systems Web Based Training and Consulting
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list