Re: What should the following query
Posted in 1997
Denham.M@amstr.com wrote: ...snip of correct answers... :You need to change your query: : :select t1.license_no :from tb1 t1, outer tb2 t2 :where t1.name = 'Hen' :and t1.licence_no = t2.licence_no :or ( t2.country = 'Mars' and t2.state = 'Colorado' ) : :I have not tried it, but believe this is what you wanted to achieve. Well, it does return something (appart from the typos with c, not s in licence_no in the where clause), but it's some rather strange results that I can't realy imagine I could use. May be I could??? Using outer and a mentioning other columns than the join column(s) in the outer table in the where clause generaly is something you have to be careful about. It is very usefull in some cases, but here you aditionally do it after an or and that or part doesn't mention the join columns. I think you still have a cartesian join behind the seans here. If the original poster wants further help I think it best for him to describe better what he wants. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org