SQL Language

  • Thread starter Thread starter Sol
  • Start date Start date
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
 
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

SQL Language 1
Build "between" parameter query programatically 2
Amazon Black friday Deals Week 1
calculated textbox 1
SQL Troubles. 1
Amazon Paid/Discounted Reviews 16
CREATE VIEW Query 2
Formula Question 1

Back
Top