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

using a trigger to get values from one table into another

P: 59
Am trying to get values from table tscore into table tgrade
Expand|Select|Wrap|Line Numbers
  1. CREATE TRIGGER qscore
  2. ON tscore
  3. FOR INSERT
  4. AS
  5. DECLARE @matno char(13)
  6. DECLARE @score int
  7. DECLARE @type char(30)
  8. IF percent = 100
  9. BEGIN
  10. UPDATE tgrade 
  11. SET quiz = SUM (score) AS "quizscore" FROM tscore
  12. WHERE type = quiz AND mat_no= @matno
  13. END
  14.  
This is not working pls correct me where am wrong its urgent pls!
Feb 10 '09 #1
Share this Question
Share on Google+
2 Replies


ck9663
Expert 2.5K+
P: 2,878
Why do you need a trigger to do this?

-- CK
Feb 13 '09 #2

P: 59
i dont know what else to use if not trigger am a begginer if there re better options please let me know
Feb 16 '09 #3

Post your reply

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