Select Case

Last Post 23 Oct 2008 06:54 AM by mypolo. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
mypolo
New Member
New Member

--
23 Oct 2008 06:54 AM
Giving the results into a table with the columns answer1, answer2, answer3, answer4, answer5,.. as "right" or "wrong". The first name and name is also included.

I am trying to get the totel of the right answers, for example 3 of 7 answers

<% select Case total
case when rs("answers1")="right" then 1 else 0 end +
case when rs("answer2")= "right" then 1 else 0 end +
case when rs("answer3")= "right" then 1 else 0 end +
case when rs("answer4")= "right" then 1 else 0 end +

end select %>



the error message is:

Microsoft VBScript compilation error '800a0401'

Expected end of statement

case when rs("antwort1")= "richtig" then 1 else 0 end +
------------------------------------^

I need you help !
You are not authorized to post a reply.

Acceptable Use Policy