Solved

how can i convert this code for sql 2000 server

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

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…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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