TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
selvi subramanian
NA
799
577.1k
it will not execute it throws sum error .can anyone give the solution for this problem?
May 15 2012 1:32 AM
-- ================================================
-- Template generated from Template Explorer using:
-- Create Trigger (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values below.
--
-- See additional Create Trigger templates for more
-- examples of different Trigger statements.
--
-- This block of comments will not be included in
-- the definition of the function.
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[OnlineApplication]
ON [dbo].[bonus]
AFTER UPDATE
AS
if(exists(select * from OnlineApplication where RefCode='Muthukrishnan1001')
select count(RefCode) from OnlineApplication where RefCode='Muthukrishnan1001'
end
if count='1'
begin
update bonus set Bonus=500
end
else
begin
update bonus set Bonus=100
end
error is
Msg 156, Level 15, State 1, Procedure OnlineApplication, Line 9
Incorrect syntax near the keyword 'select'.
Msg 156, Level 15, State 1, Procedure OnlineApplication, Line 12
Incorrect syntax near the keyword 'if'.
Reply
Answers (
2
)
Values Already Exists
user controls