cross join? full join? or something like that?

  • Thread starter Thread starter Alejandra Parra
  • Start date Start date
A

Alejandra Parra

I have this query


TRANSFORM sum(PRUEBA.str_Valor)
SELECT prueba.str_NombreAbreviado AS Nombre,prueba.str_NumeroLista AS NL
FROM ((SELECT tbl_alumnos.str_NombreAbreviado, tbl_alumnos.str_NumeroLIsta,
tbl_alumnos.str_cvegrado, tbl_alumnos.str_cvegrupo,
tbl_alumnos.str_cvealumno, tbl_calificaciones.str_valor,
TBL_CALIFICACIONES.STR_CVEDATO from tbl_alumnos left join
tbl_calificaciones on tbl_alumnos.str_cvealumno =
tbl_calificaciones.str_cvealumno where tbl_alumnos.str_cvegrado='1' and
tbl_alumnos.str_cvegrupo='B') prueba
???????????? join
(SELECT tbl_calificaciones.str_Valor,
tbl_calificaciones.str_cvealumno,TBL_DATOSCAPTURA.STR_CVEDATO,
tbl_datoscaptura.str_descripcion from tbl_calificaciones
RIGHT JOIN tbl_DATOSCAPTURA on tbl_calificaciones.str_cvedato=
tbl_datoscaptura.str_cvedato) ale
on (prueba.str_cveDATO) =(ale.str_cveDATO))
GROUP BY prueba.str_NombreAbreviado,prueba.str_NumeroLista
PIVOT ale.str_descripcion

Where the ??????????????? are located, I don´t know what to write, because
if I use RIGHT JOIN I have just a part of the table, and if I use LEFT JOIN
I get the other part of the table I need, and if I use INNER JOIN nothing
appears, because I must get NULL values in the crossed reference table, so,
I'd like some help in this
TNX!!!!
 
Perhaps what you need is something of the general form

Select Fieldlist from table A left join table B on ...

union

Select Fieldlist from table B left join table A on ...

and transform that

-----Original Message-----
I have this query


TRANSFORM sum(PRUEBA.str_Valor)
SELECT prueba.str_NombreAbreviado AS
Nombre,prueba.str_NumeroLista AS NL
FROM ((SELECT tbl_alumnos.str_NombreAbreviado, tbl_alumnos.str_NumeroLIsta,
tbl_alumnos.str_cvegrado, tbl_alumnos.str_cvegrupo,
tbl_alumnos.str_cvealumno, tbl_calificaciones.str_valor,
TBL_CALIFICACIONES.STR_CVEDATO from tbl_alumnos left join
tbl_calificaciones on tbl_alumnos.str_cvealumno =
tbl_calificaciones.str_cvealumno where
tbl_alumnos.str_cvegrado='1' and
 
Back
Top