Trying to get ownership working working whilst calling a field from another table
SQL is
select `idS1LG`,
concat(sn," ",fn)
`stuid`,
`vmlg1a`,
`vmlg1b`,
`vmlg1c`,
`vmlg1`,
`vflg1a`,
`vflg1b`,
`vflg1c`,
`vflg1`,
`vstu1`,
`class`,
`dateinput`,
`dateedited`
From `lgsem1`
right join student on lgsem1.stuid=student.code
But I want to pull the class value from another table as `student`.`home group`
I have tried it with
`student`.`form group`AS`class`,
and it works up until I use the owner field where the owner table is staff and field is home group but in the target table the class field no longer is visible so the ownership is broken.
Originally I used values to write the form to the table but realised that form (which comes from another table) can change and it needs to be updated from the student table and cross referenced from there rather than writing a static value.
Is there another way of working the ownership think so that main table owner field can be redirected to another table reference rather than writing the value to the new table?