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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:04:39+00:00 2026-05-31T06:04:39+00:00

Basic question, beginning user. I have a column (price) in a table (room). The

  • 0

Basic question, beginning user.

I have a column (price) in a table (room). The column (price) has a constraint that it has to be between 20 and 100.

I need to update the column (price) to reflect a price increase of 5%. However, some of the fields in this column will have a price >100 after the update, causing it to fall
outside of the constraint. To address this, those prices that exceed 100 need to be set to 100 instead. Here is what I have:

UPDATE ROOM
SET PRICE=
CASE 
   WHEN PRICE*1.05<100 
   THEN PRICE*1.05
   ELSE PRICE=100
END CASE
WHERE HOTELNO='1004' OR
      HOTELNO='1001' OR
      HOTELNO='1002'
;

Best I could come up with in my searches. I am getting the following error:

ORA-00905: missing keyword

This is using Oracle 10g.

Thanks in advance for any 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-31T06:04:40+00:00Added an answer on May 31, 2026 at 6:04 am

    try following

    update room
    set price=price*1.05
    where hotelno in ('1004','1001')
    and (price*1.05)<100
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very basic question - but I couldn't find an answer. I have got a
I'm beginning a project that will require me to export a user generated 3D
Sorry for such a basic question, but I need to know how to add
my first question sorry if this is too basic. I followed the tutorial Beginning
Basic Question - I have installed SQL Server Express 2008 with integrated SP1 .
Basic question but I couldn't find any related topics answering exactly what I need.
a very basic question: When I include the DOCTYPE at the beginning of my
Basic question - I have a UIWebView with a pdf document loaded. How can
Basic Question: I have a k dimensional box. I have a vector of upper
this is a very basic question, as I am just beginning with Android. 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.