Solved

how can i convert this code for sql 2000 server

Posted on 2008-10-16
5
158 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 143

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 143

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 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