nicks60610
MIS
I have a SQL statement I am running on an ASP page, and basically all it does is take 3 variables and display the information based on these 3 in a table. The problem I have is I want to display the results for 2 separate departments in one table. So I did this:
If Request.QueryString("Department"
= 06211-06212 Then
sql = "SELECT....AND WO_WORK_ORDER.DEPARTMENT = '06211' AND WO_WORK_ORDER.DEPARTMENT = '06212'...
Else
sql = "SELECT....AND WO_WORK_ORDER.DEPARTMENT = '" & Request.QueryString("Department"
& "'
End If
The problem I see is that when I pass the value for "06211-06212" from the previous page, it does not take this value and execute the above statement, but instead tries to run the SQL statement with that value as "Department" which of course does not work.
Any ideas as to what I am doing wrong here???
Thanks for all your help!
If Request.QueryString("Department"
sql = "SELECT....AND WO_WORK_ORDER.DEPARTMENT = '06211' AND WO_WORK_ORDER.DEPARTMENT = '06212'...
Else
sql = "SELECT....AND WO_WORK_ORDER.DEPARTMENT = '" & Request.QueryString("Department"
End If
The problem I see is that when I pass the value for "06211-06212" from the previous page, it does not take this value and execute the above statement, but instead tries to run the SQL statement with that value as "Department" which of course does not work.
Any ideas as to what I am doing wrong here???
Thanks for all your help!