Hi all,
I'm trying to run a subquery between 2 tables and I just can't get it to work
The 2 tables are below:
Users -- With columns of Name, Email, and StaffNumber
Users_Desc -- With columns of StaffNumber, Gender, and Job
My query is
Select Name
from Users
Where Job In (Select Job from Users_Desc Where Job = 'NULL')
I'm new to this and just have no idea what it's going wrong.
The error I'm getting is "Invalid column name 'Job'." which I assume is because it's looking in Users for it rather than User_Desc?
Any Ideas appreciated!
I'm trying to run a subquery between 2 tables and I just can't get it to work
The 2 tables are below:
Users -- With columns of Name, Email, and StaffNumber
Users_Desc -- With columns of StaffNumber, Gender, and Job
My query is
Select Name
from Users
Where Job In (Select Job from Users_Desc Where Job = 'NULL')
I'm new to this and just have no idea what it's going wrong.
The error I'm getting is "Invalid column name 'Job'." which I assume is because it's looking in Users for it rather than User_Desc?
Any Ideas appreciated!
Thanks very much... Like I say - I'm still pretty new to SQL / databases.. teaching myself and just created a few tables to do help me learn ect..
.
I aspire to be you I suppose
That worked - thanks very much! I'll study it and see where I was going wrong!