By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,064 Members | 1,542 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,064 IT Pros & Developers. It's quick & easy.

i waana create parameterized function with trigger its simple function which is help

P: 1
Expand|Select|Wrap|Line Numbers
  1. create or replace function p1() returns trigger as
  2. $body$
  3. begin
  4. ---
  5. update fixed_asset set circle_id=Irrigation_potential_details.circle_id from Irrigation_potential_details
  6. where fixed_asset.division_id =Irrigation_potential_details.division_id;
  7.  
  8. update minor_scheme_details set circle_id=Irrigation_potential_details.circle_id from Irrigation_potential_details
  9. where minor_scheme_details.division_id=Irrigation_potential_details.division_id;
  10.  
  11. update consumer_additional_details set circle_id=Irrigation_potential_details.circle_id from Irrigation_potential_details
  12. where consumer_additional_details.division_id= Irrigation_potential_details.division_id;
  13. return null;
  14. end
  15. $body$
  16. language plpgsql
  17. -----------------
Oct 29 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.