Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Multiple Keys

From: agem::crosswinds::net at: 14-Jul-2001 0:17

RE: [REBOL] Multiple Keys [louisaturk--eudoramail--com] wrote:
> Hi Rebol Experts, > > I need to use two keys in order to search for unique records in a database > (to make sure I don't insert duplicates). The following line does not work: > > if all [not find database code not find database chknum] [ > insert-data code chknum date amount special > ] > > The problem is that the two finds are finding different records. I need > for both finds to check each record in the database simultaneously for the > two keys. >
find record for key 1 and check if it has key 2 i expect you have code chknum date amount special code chknum date amount special ... then here: find database code would position 'here : code chknum date amount special ^^^^ thus chknum is [second here] and if all[(found? here) (chknum = second here)] [wrong-record]