following is my code
declare @testing varchar(255)
declare @testing2 varchar(255)
set @testing = '4'
set @testing2 = '5'
exec master..xp_cmdshell 'net send agmpimo258 ayam'
if @testing = '4'
WAITFOR DELAY '00:00:04' --pauses for 1 minute
well above is the example of the code.. i am trying to delay the program when the condition meet the if statement but when i write in that way the whole program will get delay eventhough the condition is not full filled.. please advise....thanx very much