Re: Correct Insert SQL syntax?

From: Lennin Caro <lennin(dot)caro(at)yahoo(dot)com>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>, Ruben Gouveia <rubes7202(at)gmail(dot)com>
Subject: Re: Correct Insert SQL syntax?
Date: 2008-09-05 16:11:58
Message-ID: 446001.91912.qm@web59508.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--- On Thu, 9/4/08, Ruben Gouveia <rubes7202(at)gmail(dot)com> wrote:

> From: Ruben Gouveia <rubes7202(at)gmail(dot)com>
> Subject: [SQL] Correct Insert SQL syntax?
> To: "pgsql-sql" <pgsql-sql(at)postgresql(dot)org>
> Date: Thursday, September 4, 2008, 10:16 PM
> Will this syntax work:
>
> fcn_stats are all in the same schema
>
> CREATE OR REPLACE FUNCTION insert_stats(p_date date)
> RETURNS void AS $$
>
> BEGIN
> insert into stats (
> date,
> stats1,
> stats2
> ) (select
> p_date,
>
> fcn_stats1(p_date,'basic'),
>
> fcn_stats2(p_date,'basic',0)
> from dual
> );
> END;
> $$ LANGUAGE 'plpgsql';

Dual is a table create for you or is the generic table of oracle?

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2008-09-05 16:16:03 Re: Correct Insert SQL syntax?
Previous Message Bart Degryse 2008-09-05 06:57:55 Re: Correct Insert SQL syntax?