Need help with a lookup join that shouldn't be
Posted in 1992
Topics: SQL Development & Query Writing
I'm running INFORMIX-SQL Version 2.10.03F. I have a screen form that uses a table, info. There's a state column in info. One of my users wants to see territories (which will depend on state) on this form. He wants the territory information to reside in another table, salestate, which has a state column, and three territory columns. No problem, right? You just do a lookup join: [attribute] = info.state = salestate.state, lookup [ter1] = salestate.territory1 joining *salestate.state, lookup [ter2] = salestate.territory2 joining *salestate.state, lookup [ter3] = salestate.territory3 joining *salestate.state; ...and it looks fine: Territory WE WE WE [...portion of form deleted] City [San Francisco ] State [CA] Zip [94110 ] No problem, except that this user wants to be able to query on the territory fields (to get all the records of the appropriate states), which we all know you can't do with a lookup field. Is there a way to do something *like* a lookup without actually using a lookup join? Sorry if this is a dumb question or if I'm missing something obvious... Charleen -- I'm not fat; I'm gravitationally-challenged.