Click here to Skip to main content
15,875,581 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a table ConfigurationSetting which have some column like this


create table ConfigurationSetting(id serial, fbstime character varying(20),sbstime character varying(20), tbstime character varying(20),Loc_Rep_time character varying(20),Map_Ref_time character varying(20),Store_in_cluster character varying(20),Biker_speed character varying(20),time_to_cover_distance character varying(20))



now i want to create function that insert data into above table so fuction is look like this


create function ins_ConfigurationSetting(first_beat_start_time character varying(20),second_beat_start_time character varying(20),third_beat_start_time character varying(20),Loc_Rep_time character varying(20),Map_Ref_time character varying(20),Store_in_cluster character varying(20), Biker_speed character varying(20),time_to_cover_distance character varying(20))
returns void as $$
begin
insert into ConfigurationSetting (fbstime,sbstime,tbstime,Loc_Rep_time,Map_Ref_time,Store_in_cluster,Biker_speed,time_to_cover_distance)values($1,$2,$3,$4,$5,$6,$7,$8)
returning id;
end
$$ language 'plpgsql';


this function successfully run
but when i m calling function like this


select ins_ConfigurationSetting('09:52:33','04:50:33','12:00:00','16:20:00','23:00:00','40','20','03');

it show error that


query has no destination for result data


how to resolve that
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900