| From: | Juan Ramirez <juanrmiranda(at)hotmail(dot)com> |
|---|---|
| To: | <ayudapostgre(at)gmail(dot)com> |
| Cc: | PostGreSQL Lista de Ayuda <pgsql-es-ayuda(at)postgresql(dot)org> |
| Subject: | RE: Obtener el valor de un campo serial luego de un insert |
| Date: | 2008-12-13 14:10:53 |
| Message-ID: | BAY104-W1462703D2FCA217B0BCA40D1F60@phx.gbl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-es-ayuda |
>From: ayudapostgre(at)gmail(dot)com
>....
>CREATE OR REPLACE FUNCTION agregar_item_menu(integer, integer, integer, bpchar, bpchar)
> RETURNS serial AS
>$BODY$
>BEGIN
>INSERT INTO menu (id_padre, posicion, nivel, titulo, pagina) VALUES ($1,$2,$3,$4,$5)
>.....
>pero me da el siguiente error al ejecutar la función
>ERROR: query has no destination for result data
>SQL state: 42601
>Context: PL/pgSQL function "agregar_item_menu" line 2 at SQL statement
umnnn, lo único que veo mal, es que no le veo un "punto y coma" al final de la lína "INSERT" ...
o es un error cuando pegaste la función ?
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Carlos Montecel | 2008-12-13 15:30:01 | LUN´s para Datos y Logs |
| Previous Message | M C | 2008-12-12 22:27:18 | Obtener el valor de un campo serial luego de un insert |