Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » How to make a list2 on a non existing child table
Re: How to make a list2 on a non existing child table [message #1909 is a reply to message #1908] Tue, 09 December 2008 08:35 Go to previous messageGo to previous message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
The framework isn't corrupting the sql statement it's just that the function extractTableNames returns an incorrect value:'SELECT', and therefore the records aren't filtered.

This is the correct statement, the sql statement that I want to construct is:
SELECT entidad_id, concepto, sum(importe) as importe
FROM
(SELECT entidad.entidad_id ,'Esportistes' as concepto, 1 as importe
		FROM participante 
		JOIN part_equipo_xref  ON participante.participante_id=part_equipo_xref.participante_id
		JOIN equipo  ON part_equipo_xref.equipo_id = equipo.equipo_id
		JOIN entidad  ON equipo.entidad_id= entidad.entidad_id
		JOIN temporada  ON temporada.temporada_id = equipo.temporada_id
		WHERE tippart='E'
		SELECT entidad.entidad_id ,'Equips' ,  1
		FROM participante 
		JOIN equipo  ON participante.participante_id = equipo.delegado_id
		JOIN entidad  ON equipo.entidad_id= entidad.entidad_id
		JOIN temporada  ON temporada.temporada_id = equipo.temporada_id
		UNION ALL
		SELECT entidad.entidad_id ,'Entitat',   1
		FROM entidad) as entidad_s02

[Updated on: Tue, 09 December 2008 08:36]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dynamic Report Column Headings
Next Topic: get calculated field from parent table
Goto Forum:
  


Current Time: Sun Sep 01 16:01:05 EDT 2024

Total time taken to generate the page: 0.01143 seconds