View Single Post

   
  #3 (permalink)  
Old 04-29-2008, 08:28 PM
Mike
 
Posts: n/a
Default Facing problem in Executing Stored Procedure for Sybase12.0

Dear All,

I am facing a Problem in executing a SP fr Sybase12.0

Use Test1
go
create table Data1(ID int,Names varchar(30),Names1 varchar(30),Primary
key(ID))
go

create procedure SP_Insert
AS BEGIN

Declare @Input int ,@Count int
Set @Input = 100000
Set @Count = 0

While @Count < @Input

BEGIN

Insert into Data1 Values(@Count,'hello1','hello1')

select @Count = @Count + 1

END

END

Exec SP_Insert
Go

For this I am getting an error:

Error] Script lines: 6-32 -------------------------
Incorrect syntax near '@Input'.
Msg: 102, Level: 15, State: 1
Procedure: SP_Insert, Line: 9 

Can some one help me on this?




----Mike
Reply With Quote