On 11/21/2014 07:48 AM, Suresh Raja wrote:
> Hi :
>
> i'm looking for pgsql functions to insert rows from a select query. I'm
> new pgsql. So please bear with me. Can you share some sample code if
> you have. Or if you interested in writing the code, i can out source.
Could you provide some pseudo code outlining what is want to accomplish?
Say something like:
CREATE FUNCTION some_fnc()
SELECT fld_1, fld_2, fld_3 FROM some_table WHERE id = <some_parameter>
INSERT INTO another_table(fld1, fld2, fld3) VALUES(fld_1, fld_2, fld_3)
Obviously this a simple contrived example. The more detail you can
provide, the better.
>
> Cheers!
> -SR
--
Adrian Klaver
adrian.klaver@aklaver.com