Thread: RE: [SQL] Two table select

RE: [SQL] Two table select

From
"Jackson, DeJuan"
Date:
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
>
>

Re: [SQL] Two table select

From
jwieck@debis.com (Jan Wieck)
Date:
>
> huh?!.
> Need more (comprehensible) information...
> Maybe it's just me,
>    -DEJ
>

    Not  only  you. I wasn't able to puzzle out what's the wanted
    result too.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #