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 8691621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:09:22+00:00 2026-06-13T00:09:22+00:00

I am sorry for the confusing title, I’m not sure how to put into

  • 0

I am sorry for the confusing title, I’m not sure how to put into words what I am trying to do.
Anyway, I need to evaluate two columns Flu and Pneumonia. A calculated column evaluates if the row contains values in the two columns Flu and Pneumonia and returns Flu if the Flu column for that row contains anything and returns Pneumonia if the Pneumonia column for that row contains anything. The SQL is as follows:

CASE
WHEN FluSpecifics != '' THEN 'Flu'
WHEN PneumoniaSpecifics != '' THEN 'Pneumonia'
END as VaccineAdministered

However as you can see if a row contains information in both columns, my query will only care for values in the FluSpecifics column because in the code it comes first. To further clarify if the table looks like this:

 FluSpecifics          PneumoniaSpecifics
successful vaccine      successful vaccine

The Calculated column VaccineAdministered will return Flu.
I need this column to return both if both exist. So I need it to create another row if both columns contain information. How can I do this?
Also, I need both columns to be compiled into one column called Specifics with PneumoniaSpecifics data corresponding to the row created that has “Pneumonia” in the VaccineAdministered field and FluSpecifics data corresponding to the row created that has “Flu” in the VaccineAdministered field.

If there is any further information you need, let me know.
I don’t care for exact syntax, I can find that out for myself (I am using Cache SQL). I would prefer to know a general method for doing this.
Thank you very much in advance

  • 1 1 Answer
  • 0 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-06-13T00:09:24+00:00Added an answer on June 13, 2026 at 12:09 am
    SELECT 'Flu' as VaccineAdministered
    FROM table 
    WHERE FluSpecifics != ''
    
    UNION
    
    SELECT 'Pheumonia' as VaccineAdministered
    FROM table
    WHERE PneumoniaSpecifics != '' 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry for the somewhat confusing title. Not sure really how to title this. My
Sorry for the confusing title, but I'm not sure what to call those. I'm
sorry if the title is very confusing, but I'm not sure how to really
Sorry for the confusing title, I'm not sure how to describe it in minimal
Sorry if the title sounds confusing - but this is what I am trying
Sorry for the confusing title :P I'm sure I should know this but I
Sorry for the confusing title... I need to perform an array_intersect() against a variable
Sorry if the title is confusing but I'm trying to get all comments and
Sorry for the confusing title, what I am trying to do is use Qt
I'm sorry if the title is confusing but I'm trying to record audio for

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.