Received: from srvlnx02.pup.ch ([195.15.182.196]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f36C88812175 for ; Fri, 6 Apr 2001 08:08:08 -0400 (EDT) (envelope-from juerg.rietmann@pup.ch) Subject: how to do this join ? To: pgsql-sql@postgresql.org X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000 Message-ID: From: juerg.rietmann@pup.ch Date: Fri, 6 Apr 2001 14:10:15 +0200 X-MIMETrack: Serialize by Router on srvlnx02/Pup/ch(Release 5.0.5 |September 22, 2000) at 04/06/2001 02:10:17 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Archive-Number: 200104/95 X-Sequence-Number: 2435 Hello there I have another SQL question. Please see the example : select *, (select a_typ from auftrag where a_nr=z_a_nr) as typ, (select a_t_definition_d from auftrags_typ where a_t_code=typ) as text from zylinder I have three tables that I need data from. I'd like to use the to temporary store the kind of auftrag and then use it to get the definition (clear text) from another table. The query returns that typ is not known . How can I do it ? Thanks ... jr ============================================ PFISTER + PARTNER, SYSTEM - ENGINEERING AG Juerg Rietmann Grundstrasse 22a 6343 Rotkreuz Switzerland phone: +4141 790 4040 fax: +4141 790 2545 mobile: +4179 211 0315 ============================================