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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:17:08+00:00 2026-06-05T05:17:08+00:00

I have an outdated stored procedure that looks something like: CASE WHEN (org.org_misc_data =

  • 0

I have an outdated stored procedure that looks something like:

CASE
      WHEN (org.org_misc_data = 'PAC') THEN 'pac'
      WHEN (org.dues_category = 'PART') THEN 'partner_member'
      WHEN (org.dues_category = 'FREE' AND org.org_status_flag = 'P') THEN 'associate_member'
      ELSE 'non_member'
END AS org_status

The way it it currently written, as soon as it hits the first WHEN clause, my org_status value would be “pac”. Can someone direct me how to re-write this so that org_status can contain return multiple values (ie: “pac|partner_member”).

  • 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-05T05:17:10+00:00Added an answer on June 5, 2026 at 5:17 am

    How about just using two CASE expressions?

    CASE
      WHEN (org.org_misc_data = 'PAC') THEN 'pac|' ELSE '' END
      + CASE 
        WHEN (org.dues_category = 'PART') THEN 'partner_member'
        WHEN (org.dues_category = 'FREE' AND org.org_status_flag = 'P') THEN 'associate_member'
        ELSE 'non_member'
    END AS org_status
    

    It’s tough to give a definitive answer because you haven’t really outlined all of the possible permutations.

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

Sidebar

Related Questions

I have a small framework that I would like to put out there. I
For example I have this gem called Authlogic-openid, that plugin is outdated, no longer
I noticed that they have a list of plugins here: https://wiki.mozilla.org/Bugzilla:Addons#Integration_with_Source_Code_Management_programs ...But most of
Have a SomeLib.pro file that contains: CONFIG += debug TEMPLATE = lib TARGET =
Have a matrix report now that has Position, Hours and Wages for a location
There are so many plugins/gems but must of them have outdated documentation or no
I have a Git repository that has branch (local and remote) that has become
I have a website that is being indexed by Google search. When I search
I have a program that reads financial data in JSON and inserts it into
I have an existing Grails project that I am upgrading to a new version.

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.