RE: Creating a report from 3 tables
Posted in 2000
Here's a guess:
SELECT a.user, a.code, b.question_id, b.text, c.answer_text
from a, b, c
where a.completed_column is not null
and a.question_id = b.question_id
and b.question_id = c.question_id
I must have missed something . . . what syntax errors were you generating .
. . . ?
John Carlson
Informix DBA
EDS - WHSmith USA
3200 Windy Hill Road, Suite 1500 West
Atlanta, GA 30330
> -----Original Message-----
> From: elizabeth1000@my-deja.com [mailto:elizabeth1000@my-deja.com]
> Sent: Wednesday, August 23, 2000 5:32 PM
> To: informix-list@iiug.org
> 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.
>