-1

I have a query which give me the Gross Amount for a Repair-

That amount is 10.88.

I also pull back the VAT rate that corresponds to the Repair.

In this instance it is 20.00. (20%) But this could in theory be any rate, for example 17.50.

These two fields are called "GrossAmount" and "VatRate".

What I need to try and do is work out the Vat and the Net Amount.

How would I achieve this?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
ikilledbill
  • 211
  • 1
  • 3
  • 17
  • 1
    What do you mean by `work out the Vat and the Net amount`? Please show some sample data to illustrate what you're trying to do. – Siyual Nov 01 '16 at 12:30

1 Answers1

0

Assuming that you get (from tables) the GROSS and the VAT rate, you could phrase something like:

  SELECT GROSS, VAT_RATE , (GROSS * VAT_RATE) AS VAT , (GROSS + VAT) AS NET
    FROM ....

There are, of course, other options depending on how and where from you get the data.

FDavidov
  • 3,505
  • 6
  • 23
  • 59
  • 1
    In your NET calculation you will not be able to reference VAT, you would need to use GROSS * VAT_RATE again – ThatChris Nov 01 '16 at 13:06
  • @ChristopherTrevor of course!!! You are absolutely right. Thanks for the good catch. – FDavidov Nov 01 '16 at 13:09
  • Not a problem, glad I could help – ThatChris Nov 01 '16 at 13:10
  • I'm lost. I have a material GROSS VALUE of 10.88. Using a VAT Calculator online gives me 1.81 as the VAT and 9.07 as the NET so those are the two figures I am trying to create. If I take GROSS * VAT_RATE in my data that is 10.88*20.00 which gives me 217.600? That's not right is it? – ikilledbill Nov 01 '16 at 15:05
  • Dear @killedbill, if VAT = 20, then GROSS * VAR_RATE **/ 100** because **20** means 20 percent. In your example, the GROSS VALUE **includes** the VAR, right (i.e. 9.07 * 1.2 = 10.88)? In any case, I believe that the method/idea is quite clear and you can manage from here. – FDavidov Nov 01 '16 at 15:12