Solved

how can i convert this code for sql 2000 server

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Amazon RDS migrate to SQL Server 3 35
partitioning database after decade growth 8 60
SQL Recursion 6 34
How to add an Index to a date/time field? 15 13
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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