Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Convert Access Stored Procedure into SQL Server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-01 : 10:18:36
Kara writes "I'm at my wits end and just don't know if I've done this correctly. I'm trying to rewrite a user interface to my companies helpdesk system in ASP and an example I've been following in a book describes how to create a particular stored procedure to verify a user login - only it's in Access - and I don't know if I've rewritten it correctly for SQL Server 7.0. This is what the Access version looks like:

PARAMETERS EmailAddr Text, WS_Num Text;
SELECT Workstat.EmailAddr, Workstat.WS_NUM
FROM Workstat
WHERE (((Workstat.EmailAddr)=[EmailAddr]) AND ((Workstat.WS_NUM)=[WS_Num]));

and I've written it like so in SQL Server:

CREATE PROCEDURE qparmVerifyLogin (@emailaddr varchar (40), @ws_num int)
AS
SELECT emailaddr, ws_num
FROM workstat
WHERE emailaddr = @emailaddr AND ws_num = @ws_num

Please help - does this look correct to you, because I can't figure out where else in my code I've gone wrong.

Many thanks,

Kara"
   

- Advertisement -