By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,419 Members | 1,636 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,419 IT Pros & Developers. It's quick & easy.

trigger error

P: 59
pls correct me
Expand|Select|Wrap|Line Numbers
  1. create trigger trgscore
  2. on dbo.score
  3. for insert
  4. as
  5. declare @matno char(13)
  6. declare @calscore int
  7. declare @type char(30)
  8. begin
  9. insert into grade (quiz) values(sum calscore on score where type = quiz)
  10. end 
error sum is not allowed in this context
Feb 9 '09 #1
Share this Question
Share on Google+
1 Reply


ck9663
Expert 2.5K+
P: 2,878
Read the full INSERT INTO syntax.

Here's how to use the SUM()

-- CK
Feb 13 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.