Error occured in execution of Procedure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sumanta123
    New Member
    • Dec 2008
    • 34

    Error occured in execution of Procedure

    Hi All,

    The code is:


    Execute xyz @age=12,@name=' suman'

    alter procedure xyz
    (
    @age int,
    @name VarChar(15)
    )
    as
    Begin

    create table #xyz(
    age int,name varchar(15))
    insert into #xyz values(@age,@na me)
    select * from #xyz
    end


    When i execute the procedure i am getting this error::-
    Server: Msg 111, Level 15, State 1, Line 4
    'ALTER PROCEDURE' must be the first statement in a query batch.
    Server: Msg 137, Level 15, State 1, Line 14
    Must declare the variable '@age'.


    Please help me for the needful.

    Thanks in advance.

    Rgds,
    Sumanta Panda
  • sumanta123
    New Member
    • Dec 2008
    • 34

    #2
    Dear All,
    I have resolved the problem.Its working perfectly.

    Thanks!!

    Rgrds,
    Sumanta Panda

    Comment

    Working...