Question

UPDATE job_details 
    WHERE assigned AS +1 
    WHEN assigned is NULL 
    WHEN student_details.jobscope = job_details.jobscop 
    AND student_details.jobscope1 ='IT'

Is this query right? My motive is to get the assigned row in the database to (+1) each time a student is assigned to a job with a jobscope of IT.

Was it helpful?

Solution

Try

UPDATE job_details 
JOIN student_details ON student_details.jobscope = job_details.jobscop
SET assigned = (assigned+1) 
WHERE  student_details.jobscope1 ='IT'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top