Solved

how can i convert this code for sql 2000 server

Posted on 2008-10-16
5
156 Views
Last Modified: 2012-05-05
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
Comment
Question by:devilsuraj
  • 2
5 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 22729843
there is no conversion needed, at least as far as I can see.
0
 

Author Comment

by:devilsuraj
ID: 22729992
but it throws error that object not found custtable
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22730075
if that table does not exist, that error is normal (in sql 2000)
0
 
LVL 8

Assisted Solution

by:tiagosalgado
tiagosalgado earned 250 total points
ID: 22730089
1. Do you have any CustTable on your database?
2. Are you running that code in the right DataBase?
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now