| From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
|---|---|
| To: | mario vargas careaga <mario(dot)vargas(dot)careaga(at)gmail(dot)com> |
| Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
| Subject: | Re: ayuda con consulta..... |
| Date: | 2007-05-29 21:05:14 |
| Message-ID: | 20070529210514.GI11630@alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-es-ayuda |
mario vargas careaga escribió:
> tengo una vista con la sgte estructura
> descrip | trn |cod_tipo|num_pre|temporal|baja |monto|
> desembolso 2500 3 1 1 0 2700
> desembolso 2500 3 1 1 0 2700
> desembolso 2500 3 1 1 0 2700
> interes 23 3 1 1 0 500
>
> quiero hacer la sgte consulta para despues insertarla en una funcion...
> select cod_tipo from vwtasas where vwtasas.num_pre=1;
> el resultado es este....
> cod_tipo
> 3
> 3
> 3
> 3
>
> lo que quiero saber es como puedo hacer para q con mi consulta solo me
> vote un solo registro es decir..
> cod_tipo
> 3
select cod_tipo from vwtasas where num_pre=1 and trn=23
Eso te devolvera solo un registro.
--
Alvaro Herrera http://www.amazon.com/gp/registry/5ZYLFMCVHXC
"I am amassed at [the pgsql-sql] mailing list for the wonderful support, and
lack of hesitasion in answering a lost soul's question, I just wished the rest
of the mailing list could be like this." (Fotis)
(http://archives.postgresql.org/pgsql-sql/2006-06/msg00265.php)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jenaro Centeno Gomez | 2007-05-29 21:05:34 | Re: Una Ayuda por favor |
| Previous Message | mario vargas careaga | 2007-05-29 20:56:10 | ayuda con consulta..... |