Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with Oracle9i: SQL
Here is the question:
Management is proposing to increase the price of each book. The amount
of the increase will be based on each book's category, according to
the following scale:computer books, 10%; fitness books, 15%; self-help
books, 25%; all other categories, 3%. Create a list that displays each
book's title, category, current retail price, and revised retail
price. The prices should be displayed with two decimal places. The
column headings for the output should be as follows: Title, Category,
Current Price, Revised Price.
Table being used: BOOKS
ISBN NOT NULL VARCHAR2(10) TITLE VARCHAR2(30) PUBDATE DATE PUBID NUMBER(2) COST NUMBER(5,2) RETAIL NUMBER(5,2) CATEGORY VARCHAR2(12)
I believe that I am supposed to be using the DECODE keyword. I have
other info if needed.
Can anyone help??? Thanks
Received on Wed Nov 05 2003 - 11:01:56 CST