pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jackson, DeJuan <djackson@cpsgroup.com>
To: Andy <alewis@mpsi.net>
To: pgsql-sql@postgreSQL.org
Subject: RE: [SQL] Two table select
Date: Wed, 3 Feb 1999 12:53:01 -0600
Message-ID: <F10BB1FAF801D111829B0060971D839F63FB19@cpsmail> (raw)

huh?!.
Need more (comprehensible) information...
Maybe it's just me,
	-DEJ

> -----Original Message-----
> From: Andy [mailto:alewis@mpsi.net]
> Sent: Wednesday, February 03, 1999 12:16 PM
> To: pgsql-sql@postgreSQL.org
> Subject: [SQL] Two table select
> 
> 
> I have two queries that I'd like to make as one. Here are the queries:
> 
> select * from referral where oid = $some_oid
> 
> select bldgname from apts where bldgnum = 'rbldg1'
> 
> 
> I am trying to get the bldgname from the apts table and want 
> to get all of the
> bldgname's including rbldg2, rbldg3, rbldg4. Trying to do it 
> in one select
> statment, is this possible?
> 
> 
> 
> table = referral
> +----------------------------------+--------------------------
--------+-------+
> | rstate                           | varchar()                
>         |     2 |
> | rrif                             | varchar()                
>         |    10 |
> | rphone                           | varchar()                
>         |    20 |
> | rfirstname                       | varchar()                
>         |    20 |
> | rlastname                        | varchar()                
>         |    25 |
> | rbldg1                           | varchar()                
>         |    10 |
> | rbldgcomment1                    | text                     
>         |   var |
> | rbldg2                           | varchar()                
>         |    10 |
> | rbldgcomment2                    | text                     
>         |   var |
> | rbldg3                           | varchar()                
>         |    10 |
> | rbldgcomment3                    | text                     
>         |   var |
> | rbldg4                           | varchar()                
>         |    10 |
> ....
> +----------------------------------+--------------------------
--------+-------+
> 
> Thanks in advance
> 
> Andy
> 
> 



view thread (3+ messages)  latest in thread

Message-ID: <F10BB1FAF801D111829B0060971D839F63FB19@cpsmail>
Permalink:  ../F10BB1FAF801D111829B0060971D839F63FB19@cpsmail/
Also on:    postgresql.org/message-id/F10BB1FAF801D111829B0060971D839F63FB19@cpsmail

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: djackson@cpsgroup.com, alewis@mpsi.net
  Subject: Re: [SQL] Two table select
  In-Reply-To: <F10BB1FAF801D111829B0060971D839F63FB19@cpsmail>
  References: <F10BB1FAF801D111829B0060971D839F63FB19@cpsmail>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox