We help IT Professionals succeed at work.
Get Started

SQL Table

phman1275
phman1275 asked
on
172 Views
Last Modified: 2019-11-30
Hi, I need some help about trigger and calculation field. I am thinking set a Status field as a calculation field on the Components table. This field will show either "Ready", "Usable", "Not-Ready" depends on the score on the Inspection table. If greater 90 then consider "Ready", below 90 but above 75 then consider "Usable" otherwise "Not-Ready". I think I need the trigger to do that but I have no clue.

Here are the tables:

Components
ComponentID, Version, OwnerID,  Status
1                        A11        100           Ready
2                        B23        200           Usable

Insepctions
ComponentID, Date,            Score
1                        1/3/2016     95
2                        2/13/2017   55
                          2/15/2017   65
                          2/17/2017   80

*** The third inspection result will reflect on Components table with the status "Usable".

Thanks
Comment
Watch Question
Senior Developer
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE