Solved

how can i convert this code for sql 2000 server

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

831 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