Okay, I'm working on a small retail book store database and I need to view some revised prices. I THINK I should be using the DECODE function as shown below in my desperate attempt to complete this task. If not, a little push in the right direction would be MUCH appreciated!
SELECT title, category, retail "current retail price"
FROM books
DECODE(category, "computer", retail*.90,
"fitness", retail*.85,
"self help", retail*.75,
retail*.97) "revised retail price";
I get an error everytime! I even tried having "FROM books" at the end.. that didn't work either! I'm so confused! PLEASE give me a hint as to how I can correct this...
I need to take the current retail price (retail) and according to the books category, issue a discount. I need to display the book title (title), the book's category (category), current retail price (retail) and revised retail price. Category discounts: computer = 10%, fitness = 15%, self help = 25%, and all others = 3%.
Please help me!
_runaway!
oOoo
.o
Oo
o.oO
___C||_
c|_O__ O| .oO(CHOO! CHOO!)