SQL Language

S

Sol

I need help performing an exercise in SQL Language, and here is the deal.

Customers who are part of a special program get a 15% discount off regular
book prices. To determine the discounted prices, list the book code, title,
and discounted price of every book. (Your calculated column should determine
85% of the current price, which is 100% less a 15% discount.)

Let me tell you how far I got:
SELECT BookCode, Title, Price
FROM Book;

The syntax which I don't know is, how to perform the discount price. Can
anyone help please, thank you.
Salomon
 
L

Lord Kelvan

if you just want to know all discount prices just use

SELECT Book.bookcode, Book.title, Book.price, CCur([price]*0.85) AS discount
FROM Book;

the ccur converts the number to currency if price is a text field and not a
number or currency then use

SELECT Book.bookcode, Book.title, Book.price, CCur(cint([price])*0.85) AS
discount
FROM Book;

Regards
Kelvan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top