Negative sign

Zifeou

Registered User.
Local time
Today, 00:36
Joined
Aug 24, 2003
Messages
13
SELECT Rental.BookNumber, Rental.ICNumber, Rental.DateBorrowed, Rental.DateDue, Rental.DateReturn, (([DateReturn]-[DateDue])*1) AS Fines , BookMast.Title
FROM Cust INNER JOIN (BookMast INNER JOIN Rental ON BookMast.BookNumber = Rental.BookNumber) ON Cust.ICNumber = Rental.ICNumber;

How do i define my field Fines not showing negative calculations??

Thanks in advance
 
SELECT Rental.BookNumber, Rental.ICNumber, Rental.DateBorrowed, Rental.DateDue, Rental.DateReturn, (([DateReturn]-[DateDue])*1) AS Fines , BookMast.Title
FROM Cust INNER JOIN (BookMast INNER JOIN Rental ON BookMast.BookNumber = Rental.BookNumber) ON Cust.ICNumber = Rental.ICNumber
WHERE (([DateReturn]-[DateDue])*1)>=0


But, as anything multiplied by 1 is unchanged, why do you need to multiply ([DateReturn]-[DateDue]) by 1?
 
i have tried >=0
but still can't work

*1 is the amount to be chqarged...

$1 per day late
 
It's strange. It works on my system.

The attached DB (which is saved in Access 97 format from Access 2000) contains two queries. The first query contains your SQL statement. The second query contains mine. They both work.

Removing the *1 should give you the same results.
 

Attachments

Users who are viewing this thread

Back
Top Bottom