home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / informix / 1752 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.5 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!ig!charleen
  2. From: charleen@presto.ig.com (Charleen Bunjiovianna Stoner)
  3. Newsgroups: comp.databases.informix
  4. Subject: Need help with a lookup join that shouldn't be
  5. Message-ID: <Aug.20.12.46.50.1992.19657@presto.ig.com>
  6. Date: 20 Aug 92 19:46:51 GMT
  7. Organization: IntelliGenetics Inc., Mountain View, California
  8. Lines: 33
  9.  
  10. I'm running INFORMIX-SQL Version 2.10.03F.
  11.  
  12. I have a screen form that uses a table, info.  There's a state column
  13. in info.  One of my users wants to see territories (which will depend 
  14. on state) on this form.  He wants the territory information to reside
  15. in another table, salestate, which has a state column, and three
  16. territory columns.
  17.  
  18. No problem, right?  You just do a lookup join:
  19.  
  20. [attribute] = info.state = salestate.state,
  21.     lookup [ter1] = salestate.territory1 joining *salestate.state,
  22.     lookup [ter2] = salestate.territory2 joining *salestate.state,
  23.     lookup [ter3] = salestate.territory3 joining *salestate.state;
  24.  
  25. ...and it looks fine:
  26.  
  27. Territory     WE  WE  WE
  28. [...portion of form deleted]
  29. City         [San Francisco            ]  State [CA]      Zip [94110     ]
  30.  
  31. No problem, except that this user wants to be able to query on the
  32. territory fields (to get all the records of the appropriate states), 
  33. which we all know you can't do with a lookup field.
  34.  
  35. Is there a way to do something *like* a lookup without actually using
  36. a lookup join?  
  37.  
  38. Sorry if this is a dumb question or if I'm missing something obvious...
  39.  
  40. Charleen
  41. -- 
  42. I'm not fat; I'm gravitationally-challenged.
  43.