i have a query see below
SELECT Table_Bogies.Bogie_ID, Table_Bogies.BogieSerialNumber, Table_Bogies.BogieShortName, Table_Bogies.bogieType_IDFK, Table_Manufacturers.ManufacturerName, Table_Bogies_M2M.Stores_IDFK, Table_Bogies_M2M.DateAdded, Table_Stores.Location
FROM Table_Vehicles RIGHT JOIN (Table_Stores RIGHT JOIN (((Table_Manufacturers RIGHT JOIN Table_AssetComponentType ON Table_Manufacturers.Manufacturer_ID = Table_AssetComponentType.Manufacturer_IDFK) RIGHT JOIN Table_Bogies ON Table_AssetComponentType.AssetCompType_ID = Table_Bogies.bogieType_IDFK) RIGHT JOIN Table_Bogies_M2M ON Table_Bogies.Bogie_ID = Table_Bogies_M2M.Bogie_IDFK) ON Table_Stores.Stores_ID = Table_Bogies_M2M.Stores_IDFK) ON Table_Vehicles.Vehicle_ID = Table_Bogies_M2M.Vehicle_IDFK;
i am trying to insert a default value into Stores_IDFK as an integer, so the Table_Stores.Location self populates, as you can see, the stores_IDFK is the foreign key linked to Table_stores by a right join
when i use the NZ command in SQL on Stores_IDFK, it inserts "1", but the location field doesnt update, but when i manually populate Stores_IDFK with "1", it does, am i using the NZ command wrong?