0
Would someone know to tell me the pq of this subselect is causing the error: "At Most one record can be returned by this subquery."?
(SELECT TOP 1 J.observacao " +
" FROM tblPendenciaHistorico J " +
" INNER JOIN tblPendenciaPendenciaHistorico JH " +
" ON J.historicoId = JH.pendenciaHistoricoId " +
" WHERE JH.pendenciaId = P.pendenciaId " +
" ORDER BY J.data DESC) AS historicoStatus"