anyone can help me, i want make a store procedure to validate a date using two table example:
CREATE OR REPLACE FUNCTION arrange_tgl()
RETURNS "trigger" AS
$BODY$
declare
id_category1 integer;
birth_date1 date;
begin
select id_category from as_bintang into id_category1 where id_category=new.id_category;
select birth_date from as_member into birth_date1 where birth_date=new.birth_date;
if birth_date1 >= substring ('1900-01-21',6) and birth_date1 >= substring ('1900-01-21',6)
birth_date1 :='1';
end if;
return new;
insert into as_member values (birth_date1);
end;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
but when i insert data to database i found error msg. anyone please help me
Edit/Delete Message