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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:33:47+00:00 2026-05-24T11:33:47+00:00

I have the below query: select CASE WHEN rt.ROLE_TYPE_CD = ‘SA’ THEN ap.APPL_CD +

  • 0

I have the below query:

select 
  CASE WHEN rt.ROLE_TYPE_CD = 'SA' THEN ap.APPL_CD + ' ' + rt.ROLE_TYPE_CD
       WHEN ap.APPL_SID = 1 THEN  rt.ROLE_TYPE_CD  
       ELSE NULL
       END as dropdownName,   
  rt.role_type_sid as dropdownID,   
  rt.actv_ind as active,   
  'Application Role' as dropdownCatagory        
 from cdms_role_type rt   
 INNER JOIN CDMS_APPLICATION ap  
 ON rt.APPL_SID = ap.APPL_SID
 where role_type_cd != 'All Role Types'
 **AND (CASE WHEN rt.ROLE_TYPE_CD = 'SA' THEN ap.APPL_CD + ' ' + rt.ROLE_TYPE_CD
       WHEN ap.APPL_SID = 1 THEN  rt.ROLE_TYPE_CD END ) IS NOT NULL**

I want to avoid the last AND condition and still want to get rid of NULL values in dropdown column.How do I go for it? Please help

  • 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-05-24T11:33:47+00:00Added an answer on May 24, 2026 at 11:33 am

    Filter out only the records that would produce a non-null value:

    select 
      CASE WHEN rt.ROLE_TYPE_CD = 'SA' THEN ap.APPL_CD + ' ' + rt.ROLE_TYPE_CD
           ELSE rt.ROLE_TYPE_CD
           END as dropdownName,   
      rt.role_type_sid as dropdownID,   
      rt.actv_ind as active,   
      'Application Role' as dropdownCatagory        
     from cdms_role_type rt   
     INNER JOIN CDMS_APPLICATION ap  
     ON rt.APPL_SID = ap.APPL_SID
     where role_type_cd != 'All Role Types'
       and (rt.ROLE_TYPE_CD = 'SA' or ap.APPL_SID = 1)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with the query below in postgres SELECT u.username,l.description,l.ip,SUBSTRING(l.createdate,0,11) as createdate,l.action
I have a very large query that follows the format below: select ... from
I have written this query for retrieving data from mysql as below select FeedbackCode,EMailID,FeedbackDetail,
I have the following Query which produces the output below; SELECT TBLUSERS.USERID, TBLUSERS.ADusername, TBLACCESSLEVELS.ACCESSLEVELID,
I have a select query in MySQL shown below: This query executes and produces
I have one query that returns string value, my query is select case when
I have below SQL query: SELECT * FROM ( SELECT S.aCol, S.bCol, S.cCol, ROW_NUMBER()
In the most general of cases, I have a query like below: SELECT tutor_school.name,
I have below query I am trying to show message 'No SubSource for this
I have the below query, which basically it retrieves the 5 top most books

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.