PROCEDURE WITH IN THE PROCEDURE

  • HI,

    this is mysql procedure.

    I faced problem to execute this.

    Plz help me the call procedure i faced error function .

    your answer help lot to me.

    CREATE DEFINER=`root`@`localhost` PROCEDURE `Portal_GetSingleMessage`( in pStrItemID int)

    begin

    DECLARE nextMessageID int ;

    DECLARE prevMessageID int ;

    call Portal_GetNextMessageID (pStrItemID),out nextMessageID ;

    call Portal_GetPrevMessageID (pStrItemID ) ,out prevMessageID ;

    SELECT

    ItemID,

    ModuleID,

    Title,

    CreatedByUser,

    CreatedDate,

    Body,

    DisplayOrder,

    NextMessageID = nextMessageID,

    PrevMessageID = prevMessageID

    FROM Portal_Discussion

    WHERE

    ItemID = pStrItemID ;

    end

    Thanks
    Dastagiri.D

  • You say you're getting an error when calling that? What would the specific error message be?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Gail, is right you should always post the error message in order for us to help.

    But I also noticed that this is a MYSQL procedure, not SQL Server. So you might better post it to a MySQL forum.

    [font="Verdana"]Markus Bohse[/font]

  • "call Portal_GetNextMessageID (pStrItemID),out nextMessageID ;

    call Portal_GetPrevMessageID (pStrItemID ) ,out prevMessageID ;"

    what is "Portal_GetNextMessageID"? If it is another stored procedure, then use EXECUTE instead of call.

    Other as per Gill, give the entire error mesage.

  • MarkusB (1/23/2009)


    But I also noticed that this is a MYSQL procedure, not SQL Server. So you might better post it to a MySQL forum.

    Good catch. I didn't even read the procedure.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply