Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3482132
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:31:26+00:00 2026-05-18T10:31:26+00:00

I have a very subtle problem and I’m unable to solve it until now.

  • 0

I have a very subtle problem and I’m unable to solve it until now.
Let’s take an example to better explain the problem:

I have a table Person:
With fields: ID, Name, Option1, Option1_Value, Option2, Option2_Value, Option3, Option3_Value

I want a query that shows the following:

ID      Name      Reason
1       Clark     Option1 doesn't match, Option2 doesn't match
2       Stefan    Option3 doesn't match
3       Sandra    (No errors: well just ignore this line)
4       Steven    Option2 doesn't match

So what has to be done is: for every option field, do a check (a query that’s going to read and compare the option_value using an external table) and then print the options that doesn’t match but in ONE field that serves as an error output field.

Is it possible to achieve this using Transform and Pivot ?
If so, could you please provide me with tips and advise on how should I use them ?
If not, is there an alternative ? Or maybe something I can do VBA-side ?

Thank you in advance guys
Miloud

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:31:26+00:00Added an answer on May 18, 2026 at 10:31 am

    Your table already has the three options in a row, so how about:

    SELECT ID, Name, 
         IIf(Option1_Value<>"Something","Option1 dosn't match",
            IIf (Option2_Value<>"Something","Option2 dosn't match",
               IIf( Option3_Value<>"Something","Option3 dosn't match","No errors")))
         As Reason
    FROM Table
    

    It is not quite clear from your post what the options do not match, nor is it clear what is the difference between Option and Option_Value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have found a very subtle bug in my R code just now. The
I have a very subtle problem with XNA, specifically the SpriteBatch. In my game
i have very serious problem if any tech expert can help...thank you in advance..
I have very strange problem while I am submitting a practice problem on codechef.
I have very simple OpenGL ES example similar to Hehe's example : http://nehe.gamedev.net/tutorial/ios_lesson_02__first_triangle/50001/ As
I have very long integer sequences that look like this (arbitrary length!): 0000000001110002220033333 Now
I have a very subtle bug that I'm having trouble identifying. Background: We have
I have very general problem on DNN 6.0 web site that I am working
I know that the title is very subtle but I have absolutely no idea
Most iPhone apps that I use have a very subtle but slick behavior when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.