Re: CONSTRUCT with multible tables?
Posted in 1994
In article <zorbaCJ9J7n.4vE@netcom.com> zorba@netcom.com (Harry Skelton) writes: >From: zorba@netcom.com (Harry Skelton) >Subject: CONSTRUCT with multible tables? >Date: Fri, 7 Jan 1994 14:06:58 GMT >I have a problem that Informix could not answer quickly. (They rarely answer >anything quickly...and I pay for this support???? *BLECK*) >Anyway, I have a construct that is sorta like the following: > define where_clause char(200) > construct by name where_clause on > clnt.clnt_nmbr, > clnt.clnt_nm_1, > clnt_contact.contact_nm_1, > clnt_contact.contact_nm_2, > clnt.addr_1, > ... > let sql_var="select * from clnt,clnt_contact where ",where_clause, > " and clnt_contact.clnt_nmbr = clnt.clnt_nmbr" > > This is inconsistant in it's selection. An additional problem is that I > want to select the client record, and the contact record, but if a > contact record is not present, I still want the client record anyway. To do that I suggest that you try 'OUTER' joining the client record to the contact table. As for it being inconsistent you'd have to be a little more specific about the type of error you are getting and also the structure of the two tables and indexes associated with them.