Correct Insert SQL syntax?

From: "Ruben Gouveia" <rubes7202(at)gmail(dot)com>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Correct Insert SQL syntax?
Date: 2008-09-04 22:16:13
Message-ID: 51e507b0809041516s23978e0btb1e8540d68971656@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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';

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Yura Gal 2008-09-04 22:49:15 Re: Correct Insert SQL syntax?
Previous Message Ruben Gouveia 2008-09-04 21:07:34 Re: Dynamic SQL Syntax help please