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

  • Home
  • SEARCH
  • 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 7571041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:34:24+00:00 2026-05-30T15:34:24+00:00

Below is my query. Is this righ? SQL> select case when value in (1000)

  • 0

Below is my query. Is this righ?

SQL> select case when value in (1000) then null
2  when user in ('ABC') then user
3  when area in ('DENVER') then
4  if value = 2000 then 'Service1'
5  else value = 3000 then 'Service2'
6  end if
7  else null
8  end as num_code from service_usoc_ref;
if prin = 2000 then 'Omaha'
*
ERROR at line 4:
ORA-00905: missing keyword

Please help me.

  • 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-30T15:34:25+00:00Added an answer on May 30, 2026 at 3:34 pm

    You can either put another case or use decode (as @madhu suggested):

    select case 
      when value in (1000) then null
      when user in ('ABC') then user
      when area in ('DENVER') then
        case when value = 2000 then 'Service1'
             when value = 3000 then 'Service2'
        end 
      else null
      end as num_code 
    from service_usoc_ref;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have RO access on a SQL View. This query below times out. How
I have written this query for retrieving data from mysql as below select FeedbackCode,EMailID,FeedbackDetail,
This might be a very simple thing. Check out the normal sql query below
I am using Microsoft Sql Server 2008. with this below query certain rows are
I have a select query in MySQL shown below: This query executes and produces
Consider the SQL query below: SELECT * FROM opening_hours WHERE week_day = WEEKDAY(NOW()) +
I have this query below: $msgg = mysql_query(SELECT * FROM mytable WHERE time>$time AND
I have this query below: SELECT a.id, b.item_name FROM table_1 as a INNER JOIN
I have below query I am trying to show message 'No SubSource for this
What does the below query explain? SELECT * FROM `jos_menu` WHERE (id = 69

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.