L
leodippolito
I have these tables:
Questions
- id (PK)
- description
- status
Replies
- id (PK)
- status
- idQuestion (FK)
I am trying to run this query within an ASP.NET application (OleDB):
---
SELECT QUE.id, QUE.description, QUE.status, COUNT(REP.id) AS
NumberOfReplies
FROM (Questions QUE LEFT OUTER JOIN (SELECT id, idQuestion FROM
Replies WHERE (status = 1)) REP ON QUE.id = REP.idQuestion)
WHERE (QUE.status = 1) AND (NumberOfReplies = 0)
GROUP BY QUE.id, QUE.description, QUE.status
---
I am receiving this error:
"no value given for one or more required parameters"
If I remove this part:
[AND (NumberOfReplies = 0)]
from the where clause, it works OK.
But I need that condition... NumberOfReplies = 0
What could be wrong?
TIA
Questions
- id (PK)
- description
- status
Replies
- id (PK)
- status
- idQuestion (FK)
I am trying to run this query within an ASP.NET application (OleDB):
---
SELECT QUE.id, QUE.description, QUE.status, COUNT(REP.id) AS
NumberOfReplies
FROM (Questions QUE LEFT OUTER JOIN (SELECT id, idQuestion FROM
Replies WHERE (status = 1)) REP ON QUE.id = REP.idQuestion)
WHERE (QUE.status = 1) AND (NumberOfReplies = 0)
GROUP BY QUE.id, QUE.description, QUE.status
---
I am receiving this error:
"no value given for one or more required parameters"
If I remove this part:
[AND (NumberOfReplies = 0)]
from the where clause, it works OK.
But I need that condition... NumberOfReplies = 0
What could be wrong?
TIA