Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2011
    Posts
    2

    Arrow Unanswered: Stored procedure to improve performance

    Please show me how to write a stored procedure for this query....Thanks

    SELECT consumer_number,name,address,contact_mobile,subare aid,
    ownership,hometype,num_cfl_type1,num_cfl_type2,num _icl_type1,num_icl_type2,
    payment_received,distribution_completed,participat ion, non_participating_reason,registeredr,registereddat e
    FROM cpa_consumerinfo
    WHERE subareaid =?;

    PLEASE SOMEONE HELP ME WITH THIS....

  2. #2
    Join Date
    May 2004
    Posts
    144
    Code:
    DELIMITER $$
    DROP PROCEDURE IF EXISTS `spCurrentTeamValue` $$
    CREATE PROCEDURE `spMy`(IN sid INT)
    BEGIN
      SELECT consumer_number,name,address,contact_mobile,subare aid,
      ownership,hometype,num_cfl_type1,num_cfl_type2,num _icl_type1,num_icl_type2,
      payment_received,distribution_completed,participat ion, non_participating_reason,registeredr,registereddat e
      FROM cpa_consumerinfo
      WHERE subareaid =sid;
    END $$
    DELIMITER ;
    & call it by

    Code:
    CALL spMy(1);

  3. #3
    Join Date
    Dec 2011
    Posts
    2
    Thanks!!!! i got it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •