View Single Post

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


"Mike" <apurv.agarwal@gmail.com> wrote in message
news:b88502ab-a361-4b00-91a9-39bb3eb4079b@i36g2000prf.googlegroups.com...
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



Although I've seen it in newer ASE versions there is no need for "AS BEGIN".
It is simply "as". And the last "END" would be replaced with "go".


Reply With Quote