pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masaru Sugawara <rk73@sea.plala.or.jp>
To: Denilson Guedes Duarte <denilson@bnet.com.br>
Cc: pgsql-admin@postgresql.org
Subject: Re: Problems in query
Date: Wed, 29 May 2002 21:17:26 +0900
Message-ID: <20020529204154.7872.RK73@sea.plala.or.jp> (raw)
In-Reply-To: <001701c203eb$31173e80$0a01010a@bnet.com.br>
References: <001701c203eb$31173e80$0a01010a@bnet.com.br>

On Sat, 25 May 2002 09:53:39 -0300
"Denilson Guedes Duarte" <denilson@bnet.com.br> wrote:


> and runs ok, but the problem is that the table username (alias u) hane N records and I want to get only one record. I try to use a subqyuery:
> select ....
> (select u.username from ctareceber c left join username u on u.id=c.cod_cliente limit 1) as fldusername
> .....
> in this case the query run ok, but I lose the left join property.
> 
> How I can to do run with left join and get only one record in the other table (username u) ?
> 


I'm not sure what the problems is.
Could you show us the output of the result you hope ?


Regards,
Masaru Sugawara






view thread (3+ messages)  latest in thread

Message-ID: <20020529204154.7872.RK73@sea.plala.or.jp>
Permalink:  ../20020529204154.7872.RK73@sea.plala.or.jp/
Also on:    postgresql.org/message-id/20020529204154.7872.RK73@sea.plala.or.jp

 · 

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-admin@postgresql.org
  Cc: rk73@sea.plala.or.jp, denilson@bnet.com.br
  Subject: Re: Problems in query
  In-Reply-To: <20020529204154.7872.RK73@sea.plala.or.jp>
  References: <001701c203eb$31173e80$0a01010a@bnet.com.br> <20020529204154.7872.RK73@sea.plala.or.jp>

* 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