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
 Transact-SQL (2000)
 Stored Procedure error

Author  Topic 

batanyah
Starting Member

5 Posts

Posted - 2009-06-02 : 00:32:55
CREATE PROCEDURE sp_st_verify_login (
@labcode VARCHAR(20),
@daysofweek VARCHAR(20)
)
AS
IF EXISTS
(SELECT dbo_st_student_schedule.*,dbo_schedule.*
FROM dbo_st_student_schedule,dbo_schedule
WHERE
(
dbo_st_student_schedule.schedule_no = dbo_schedule.schedule_no
AND
(
REPLACE(dbo_schedule.room_code,' ','') = @labcode
)
AND
CONVERT(VARCHAR,{fn NOW()},108) >= CONVERT(VARCHAR,dbo_schedule.time1,108))
AND
(
CONVERT(VARCHAR,{fn NOW()},108) <=
CONVERT(VARCHAR,dbo_schedule.time2,108)
)
AND (days = @daysofweek)
)
)

GO

error is incorrect syntax near ')' at line 25.

I just can't seem to debug this, does anybody how to correct this?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-06-02 : 00:38:26
remove the last )


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

batanyah
Starting Member

5 Posts

Posted - 2009-06-02 : 00:44:42
im still having the same error removing the last )
Go to Top of Page

batanyah
Starting Member

5 Posts

Posted - 2009-06-02 : 01:10:27
thanks for the effort guys. But i was able to fix it.
Go to Top of Page
   

- Advertisement -