Re: [GENERAL] Hi there, new here and have question

2008-07-11 Thread Charles Simard
|> |> -Original Message- |> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Hendra |> Sent: 8 juillet 2008 02:59 |> To: pgsql-general@postgresql.org |> Subject: [GENERAL] Hi there, new here and have question |> |> Hi Everyone. |> I'm just subscribe to the mailing list |> I'm n

Re: [GENERAL] Hi there, new here and have question

2008-07-09 Thread Asche
CREATE OR REPLACE FUNCTION listofemployeebasedondepartment(_id_dept int) RETURNS SETOF record AS $BODY$ DECLARE empdata record; BEGIN RETURN QUERY SELECT e.*, d.department_name FROM employee e, dept d WHERE e.id_dept = d.id AND e.id_dept = _id_dept; RETURN; END; $BODY$ LANGUAGE 'plpg

Re: [GENERAL] Hi there, new here and have question

2008-07-08 Thread Asche
Any suggestion everyone? Sorry, i was to fast sending this email out ;-) change the first parameter in the first line to '_id_depth' CREATE OR REPLACE FUNCTION listofemployeebasedondepartment(_id_dept int) RETURNS SETOF employee AS $BODY$ BEGIN RETURN QUERY SELECT * F

Re: [GENERAL] Hi there, new here and have question

2008-07-08 Thread Asche
Hi Hendra, create function listofemployeebasedondepartment(id_dept int) $$ declare resultset ??; begin select * into resultset from employee where id_dept = id_dept; return resultset; end $$ language 'plpgsql'; I believe you get what I want But I just couldn't finish the code since I mi