how to do this join ? - Mailing list pgsql-sql

From juerg.rietmann@pup.ch
Subject how to do this join ?
Date
Msg-id OF9E707DA8.649AA3F3-ONC1256A26.00427E3C@pup.ch
Whole thread Raw
Responses Re: how to do this join ?
Re: how to do this join ?
List pgsql-sql
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 <as typ> 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
============================================



pgsql-sql by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: Index on View ?
Next
From: Peter Eisentraut
Date:
Subject: Re: how to do this join ?