G
Guest
Hi,
We are developing a Visual Net application and we found a problem using a
datagrid with a SQL sentence that
includes the HAVING clause.
Does somebody know if exist any bug with this clause, if yes how can we do?
The SQL sentence is:
SELECT a.ORDENTRABAJO,a.DESORDENTRABAJO,Count(a.EQUIPO) AS TotalEquipos FROM
WK_OTSAP_PUENTE a
WHERE a.REALIZADA='1'
GROUP BY a.ORDENTRABAJO,a.DESORDENTRABAJO
HAVING (Count(a.EQUIPO))=(SELECT Count(*) AS total FROM WK_OTSAP_PUENTE
WHERE ordentrabajo=a.ordentrabajo)
In we run the sql sentence in the databse the result is correct, but the
datagrid shows null in each row,
althought the row number is correct!!! Without "HAVING" the datagrid runs OK
Thanks in advance
We are developing a Visual Net application and we found a problem using a
datagrid with a SQL sentence that
includes the HAVING clause.
Does somebody know if exist any bug with this clause, if yes how can we do?
The SQL sentence is:
SELECT a.ORDENTRABAJO,a.DESORDENTRABAJO,Count(a.EQUIPO) AS TotalEquipos FROM
WK_OTSAP_PUENTE a
WHERE a.REALIZADA='1'
GROUP BY a.ORDENTRABAJO,a.DESORDENTRABAJO
HAVING (Count(a.EQUIPO))=(SELECT Count(*) AS total FROM WK_OTSAP_PUENTE
WHERE ordentrabajo=a.ordentrabajo)
In we run the sql sentence in the databse the result is correct, but the
datagrid shows null in each row,
althought the row number is correct!!! Without "HAVING" the datagrid runs OK
Thanks in advance