I have a query where I calculate the total sum of an item based on different prices.
If I enter a new article and I leave certain cells empty, the price is calculated correctly with an empty cell.
If I now put a value in the empty cell, the calculation also happens correctly, but the cell cannot be emptied afterwards (no empty cell is allowed).
In the DB it says "Allow null's"
This only happens in cells where a number is stated, not in a cell with text.
CREATE VIEW dbo.Particulier
AS
SELECT Auto_Merk, Plaats, ref_vast, ref_es, Ref, Omschrijving, Datum, snijden, snijden_foto, Bol, ref_set7P, ref_set13P, werk_vast, werk_orig, werk_es, opleg_13P, Caravan, prijs_vast, prijs_es, prijs_set7P, prijs_set13P, Spoiler_ref,
Spoiler_prijs, Codering, Codering_prijs, Uitbreidingsset, Uitbreidingsset_prijs, PDC_uitschakeling, ROUND((prijs_es * 1.21 + werk_es + prijs_set7P + ISNULL(Spoiler_prijs, '0') + ISNULL(Codering_prijs, '0')
+ ISNULL(Uitbreidingsset_prijs, '0')) / 10, 0) * 10 AS geplaatstes, ROUND((prijs_vast * 1.21 + werk_orig + prijs_set7P + ISNULL(Spoiler_prijs, '0') + ISNULL(Codering_prijs, '0') + ISNULL(Uitbreidingsset_prijs, '0')) / 10, 0)
* 10 AS geplaatstorig, ROUND((prijs_vast * 1.21 + werk_vast + prijs_set7P + ISNULL(Spoiler_prijs, '0') + ISNULL(Codering_prijs, '0') + ISNULL(Uitbreidingsset_prijs, '0')) / 10, 0) * 10 AS geplaatstvast, checkvast, checkorig,
checkes, Cataloog_ID
FROM dbo.Cataloog
