is it possible to query in this way like ‘OR’ function.
Updated example:
Select S.*, U.* from Staff S, Unit U where S.Unit='' OR S.Unit= U.UnitCode;
Staff Table Schema:
Staff ID, Staff Name, UnitCode, StaffNumber
Unit Schema:
UnitCode, ClassCode
The above updated example works. But the staff records whom unit is blank will be duplicated with all the unit codes.
For example of results output:
Staff ID Staff Name UnitCode ClassCode Staff Number
1 John IT1 B123 234
2 Sally BUS2 B234 0589
3 Johnson IT1 B123 111
4 Johnson BUS2 B234 111
Thanks
Since you are using SQLite, Use
ORinstead of||What is the result if I removed this condition?
S.Unit = ''UPDATE 1
can you try this one?