Good, I need help because I can not find a problem, I have a table 'A' of meetings and a table 'B' of users, table A contains a field called 'Organizer', which stores the Login of a user (eg: Juan Perez, your login it's 'jperez'). Table B stores the users and information of each one (Full name, Email, Area, Boss ID) when building my query, I can get the full name of the Organizer user by making a Join to the Users table and adding the field directly:
Select A.[ID],A.[Asunto],A.[IDObjetivo],A.[Ubicacion],A.[Organizador],A.[FechaCreacion],A.[FechaReunion],u.[fullname] AS Ejecutivo from [AgendaReuniones] A
JOIN users u ON
A.[Organizador] = u.[username]
My big question is the following, how can I get the Chief of the Organizer ?, in the Users table there is a field called 'IDJefe' as shown below:
ID UserLogin IDJefe
1001 Jefe1 NULL
1002 Jefe2 NULL
1003 Usuario1 1001
1004 Usuario2 1001
1004 Usuario3 1002