Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 query help..

Author  Topic 

darren112uk
Starting Member

1 Post

Posted - 2006-12-06 : 10:09:32
I have a table named 'Transactions' which contains the following fields:-
transaction_id transaction_date , amount_paid , ship_date ..

I would like to write a query that takes all the entries for amount_paid adds them together, divides by 100, and then multiplies by 17.5%, to work out the VAT...

Please help!!

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-06 : 10:12:15
select .00175 * sum(amount_paid)
from yourtablenamehere

you should pay attention in class or ask you prrofessor. that's why he gets paid.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-06 : 23:48:27

http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -