Is there anyway to create a insert function?
I am trying:
CREATE FUNCTION add_user(varchar(20),varchar(20),varchar(20),int4,int4)
RETURNS int4 AS 'INSERT INTO usr
(user_name,first_name,last_name,permission_set_id,customer_id) values
($1,$2,$3,$4,$5)' language 'sql';
and get:
ERROR: function declared to return integer, but final statement is not a
SELECT
I thought that a insert would return a internal row #, but I am not sure
about this.
Thanks,
David Durst
MIS Manager
www.la-rubber.com