Hello, friends!
I have a simple query, that works as expected:
But I would like to substitute the set "'A01','A04','A07','A08','A10','A13','A16','A19','A22','A25','A84'" with a subquery
g.tx_claves=:'A01','A04','A07','A08','A10','A13','A16','A19','A22','A25','A84'; WHERE g.tx_grupo = '05'
I know the problem is that the subquery result is a string as a whole, but is there a way to get the right answer? any help?
I have a simple query, that works as expected:
Code:
SELECT c.tx_clave, c.tx_descripcion
FROM no_conceptos AS c
WHERE c.tx_clave In ('A01','A04','A07','A08','A10','A13','A16','A19','A22','A25','A84')
But I would like to substitute the set "'A01','A04','A07','A08','A10','A13','A16','A19','A22','A25','A84'" with a subquery
Code:
SELECT c.tx_clave, c.tx_descripcion
FROM no_conceptos AS c
WHERE c.tx_clave In (SELECT g.tx_claves FROM no_grupos AS g WHERE g.tx_grupo = '05');
I know the problem is that the subquery result is a string as a whole, but is there a way to get the right answer? any help?