Hi there, I need your help.
Here is my problem.

I tried this query example in ASP Classic 3.0 and dbms SQL Server 2008:
Code:
strSQL = " SELECT COUNT(*)  FROM dotable "
strSQL = strSQL & " WHERE  1 "
 
If Request.Querystring("MA_Cod") <> "" then
   strSQL = strSQL & " AND MA_Cod ='" & trim(Request.Querystring("MA_Cod")) & "' "
end if

strSQL = strSQL & " GROUP BY "

If Request.Querystring("MA_Cod") <> "" then
   strSQL = strSQL & "   MA_Cod; "
ElseIf Request.Querystring("TR_Cod") <> "" then
   strSQL = strSQL & "   TR_Cod; "
End If
How to reproduce the same query where condition and the same output in code-behind of .net (C#) ?
It's possible?

Can you help me?
Thanks in advance.