Another SQL question

I am using HSGLDB database and what works in another database does not work in this new one.
This works SELECT “Cost” * .2 AS “VAT1” FROM “tblRecInfo”
But this doesn’t:
SELECT “NetCost” * .05 AS “VAT” FROM “tblEonEnergyPlan”
In the SQL window from Tools, the output is just commas, and no figures.

The NetCost is to be calculated by the query, then the VAT figure added to it. I have found that if I use any other field ie Payment or UsageCharge, the VAT figure is calculated and shown. Also , if I enter a figure in the NetCost field, the VAT is calculated and shown. I must be missing something blindly obvious!
Thanks for your patience.

If ‘NetCost’ is to be calculated by the query, where is that calculation?

opps sorry forgot to add it:
SELECT “UsageCharge” - “Reward” AS “NetCost” FROM “tblEonEnergyPlan”

Again, learning SQL is very important in using ANY database. This is pretty simple and almost identical to the last problem. To get a result of both calculations use this statement (un-tested):

SELECT "UsageCharge" - "Reward" as "NetCost", ("UsageCharge" - "Reward") * .05 AS "VAT" FROM "tblEonEnergyPlan"

If this answers your question please click on the :heavy_check_mark: (upper left area of answer).

Yes, I need to get out of Access mode and into SQL. I’m afraid it’s going to be one step at a time.
Thank you, it did work.

You’re quite welcome. SQL is there in Access too, but in a different way. When I first started with Base I soon discovered SQL was critical so I learned as I was learning Base. Here is a site which may help - click here.

Just to let you know, I have managed to get all 4 of my databases from Access to LO Base, and have spent time with pen and paper working out by steps on how to get the sql statements working. Thak you anyways for your time and patience with me.

@Avvy65 Again, you are welcome. Can’t say it was always easy to get some of the concepts across, but I am certainly glad you have the desired results.