In message <4983be3c.4070...@advantos.net>, Bill Haskett <wphask...@advantos.net> writes
  Ken:
  I think so.  I'm looking at this as the best (or easiest) alternative.
  Thanks very much for the thought.
  Bill

I've rethought my idea a bit. What I don't quite get is how you build up that massive list of clients in the first place. Am I correct in thinking you own the customers, the customers own the clients? Okay.

How does the database know which clients are owned by which customers? Sensible design says the CLIENT file will have a field called CUSTOMER.OWNER (or similar). Certainly there won't be a list of clients in the CUSTOMER file - that could be a massive mv list and is poor poor poor design ...

So you should be able to do a

EVAL "LOCATE( CUSTOMER.ID , TRANS( CLIENT, CLIENT.ID, "CUSTOMER.OWNER", "X"), 1, 1, 1)"

in your query. Note I'm not sure of the locate syntax, I'm looking for a sub-value (assuming CUSTOMER.OWNER is multi-valued and TRANS does a LOWER). If this returns true, your customer can see this client.

There's your select, and it'll probably run faster, too :-)

Cheers,
Wol
--
Anthony W. Youngman <pi...@thewolery.demon.co.uk>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source Pick
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to