Received: from scan1.fhg.de (scan1.fhg.de [153.96.1.35]) by postgresql.org (Postfix) with ESMTP id DD1014759BC for ; Wed, 27 Mar 2002 07:23:32 -0500 (EST) Received: from scan1.fhg.de (localhost [127.0.0.1]) by scan1.fhg.de (8.11.1/8.11.1) with ESMTP id g2RCNVO16228 for ; Wed, 27 Mar 2002 13:23:31 +0100 (MET) Received: from iese.iese.fhg.de (iese.iese.fhg.de [153.96.133.2]) by scan1.fhg.de (8.11.1/8.11.1) with ESMTP id g2RCNV516224 for ; Wed, 27 Mar 2002 13:23:31 +0100 (MET) Received: from pc149 (pc149.iese.fhg.de [153.96.134.106]) by iese.iese.fhg.de (8.9.3/8.9.3) with ESMTP id NAA18186 for ; Wed, 27 Mar 2002 13:23:30 +0100 (MET) Reply-To: From: "Torsten Willrich" To: Subject: Problem how to combine to two tables Date: Wed, 27 Mar 2002 13:23:29 +0100 Message-ID: <000b01c1d58a$342d6d40$6a866099@iese.fhg.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200203/356 X-Sequence-Number: 7230 Ok, to explain my problem, it is the easiest way, to make an example: let's say we have two tables: Table1 looks like this: Employee_ID Room ------------------------ {1,3} 201 {3} 202 And Table2 looks like this: ID Employee --------------- 1 Torsten 2 Markus 3 Daniel This means, that if the two tables are linked properly, that Torsten and Daniel sit in room no. 201 and Markus in room No. 202. And linking properly is my problem: I want an output like this Employee_ID Room ID Employee {1,3} 201 1 Torsten {1,3} 201 3 Daniel {2} 202 2 Markus That means, that the SELECT-statement has to be something like this: SELECT * from Table1,Table2 where Table1.Employee_ID=Table2.ID; But of course this doesn't work, because I can't compare an int to a set of int :-( Does anyone know how to do this correct?