Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

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

0
devilsuraj
Asked:
devilsuraj
  • 2
2 Solutions
 
Guy Hengel [angelIII / a3]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
 
tiagosalgadoCommented:
1. Do you have any CustTable on your database?
2. Are you running that code in the right DataBase?
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now