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)
 Calling a stored procedure with a case statement

Author  Topic 

filf
Yak Posting Veteran

67 Posts

Posted - 2001-07-03 : 07:57:47

What is wrong with this, I have tried if and case statements, removed the begin and end yet it is always giving me syntax errors. If I just execute a statment say a print - no problem.

declare @curDay integer
set @curDay = datepart(Dw, getDate())
WHILE (@curDay = 3)
begin
sp_wa_resetWeeklyTotals
end

Is there a problem calling stored procs in this way, I know I am doing something stupid I have just not discovered what it is yet. Please help. NICK


   

- Advertisement -