AnsweredAssumed Answered

SQL Join two tables

Question asked by cestebanesteban on Nov 22, 2018
Latest reply on Nov 22, 2018 by cestebanesteban

Hi,

 

I have to tables:

 

1- usuarios : I have the personal info of my crew (including email address that I need)

2- permisos: With the permits and proyects that the personal are working for.

 

I need to extract the email from the "Usuarios" table that are working in a specific proyect. - All mails from the user that are working in this proyect.

The tables are related with the same ID ("usuario numero" (from "usuarios") and "permisos_usuario" (from "permisos" table)

 

I´m using SQL but dont work properly.

 

Let (

[

$proyect="PATRIA";

]

;

ExecuteSQL("

select u.usuario_emailpersona

from usuarios u

INNER JOIN permisos p

ON

u.usuario_numero = p.permisos_usuario

and

p.permisos_proyecto=?

" ; "" ; "" ;  $proyect)

)

 

Thanks a lot for you help.

Outcomes