how can i convert this code for sql 2000 server

hey how can i convert this code into sql server 2000 please help
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[veryfypassword]
 
(
@C_UserName varchar(50),
@C_Pass varchar(50)
)
	/*
	(
	@parameter1 int = 5,
	@parameter2 datatype OUTPUT
	)
	*/
AS
declare @ID varchar(100)
 
 
select @ID= C_UserName
from CustTable
where C_UserName = @C_UserName
and C_Pass=@C_Pass
 
if @ID is not null
return 0
else
if exists(select C_UserName from CustTable where C_UserName=@C_UserName)
return 2
else
RETURN 1
'

Open in new window

devilsurajAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
there is no conversion needed, at least as far as I can see.
0
 
devilsurajAuthor Commented:
but it throws error that object not found custtable
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
if that table does not exist, that error is normal (in sql 2000)
0
 
tiagosalgadoConnect With a Mentor Commented:
1. Do you have any CustTable on your database?
2. Are you running that code in the right DataBase?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.