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