Advertisement

08.11.2008 at 09:28AM PDT, ID: 23638423
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.5

T-SQL logic statement

Asked by megnin in SQL Query Syntax, Programming for ASP.NET, Microsoft Visual Basic.Net

Tags:

I have a web form, kind of like a survey, but it's to determine eligibility.  For one of the questions, there has be a change in criteria.
The original question was simply a Yes or No question and I populated the field (using VB) in the DB with:
("INSERT INTO My_DB (Name, Question1) VALUES (@Name, @Question1)",DBConn)

Now they have added 10 criteria to determine if Question1 is Yes or No.
There are 4 groups of questions.  A, B, C and D.  If the criteria of any one group is met, then Question1 is "YES".
They are as follows:
Group A:  (for this one to be met, ALL THREE must be "Yes")
1
2
3
Group B:  (for this one to be met, EITHER ONE or both must be "Yes")
4
5
Group C:  (for this one to be met, ANY ONE or more must be "Yes".  Similar to B.)
6
7
8
Group D:  (for this on to be met, BOTH must be "Yes", similar to A.)
9
10

If the critera for ANY group met then Question1 is "Yes".
So, if all (1,2 and 3)  OR
Any of (4,5,6,7 or 8) OR
all (9, 10) are "Yes" Then Q1 is "Yes".

I know that either IF...THEN or CASE...WHEN could be used.
I'm just not sure how to get started with that T-SQL logic and be able to stick it between two commas in the existing statement.

Thanks!Start Free Trial
[+][-]08.11.2008 at 09:35AM PDT, ID: 22205856

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Query Syntax, Programming for ASP.NET, Microsoft Visual Basic.Net
Tags: T-SQL, SQL Server 2000
Sign Up Now!
Solution Provided By: DanielWilson
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.11.2008 at 09:38AM PDT, ID: 22205880

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.11.2008 at 09:41AM PDT, ID: 22205914

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.11.2008 at 09:43AM PDT, ID: 22205935

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.11.2008 at 09:45AM PDT, ID: 22205956

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.11.2008 at 09:53AM PDT, ID: 22206038

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.11.2008 at 09:53AM PDT, ID: 22206040

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.11.2008 at 10:02AM PDT, ID: 22206128

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628