Re: Creating a report from 3 tables
Posted in 2000
Elizabeth This system sounds eerily(sp?) familiar :-). This seems to be a simple 3-way join in informix, unless I am missing something. Try this... select a.user, a.code, b.question_id, b.text, c.answer_text from table_A a, table_B b, table_C c where a.question_id = b.question_id and b.question_id = c.question_id and a.completed is not null HTH Sujit elizabeth1000@my-deja.com on 08/23/2000 02:32:00 PM Please respond to elizabeth1000@my-deja.com To: informix-list@iiug.org cc: Subject: Creating a report from 3 tables I am an Oracle DBA who's been put in charge of a Informix database (all databases are alike right?) Anyway I have to immediately generate a report that takes columns from 3 different tables. From Table A we need user and code (it has a 3rd column FK question_id) these need to be selected where the completed column is not null From Table B we need question_id and text where question_id matches the question_id of the not null completeds returned above Table 3 answer_text (where question_id matches question_id above) I've written this and run it on an Oracle database, I've pulled it into a temporary table and pulled the report from there and also created an on update trigger that populates a holding table. But nothing I do in Informix seems to work, I can't even get past syntax errors, could someone please point me in the right direction? Thank Lizzy Sent via Deja.com http://www.deja.com/ Before you buy.