Re: Subquery as a Calucated field
I have a simple problem but I don’t know how to solve it. The statistic that I’m doing is incorrect because of some changes that are done that I did not take into account. The error – ONE Location ONE type of Device. The problem is - that ONE location can change the device occasionally so when counting the errors on a single type of device on that ONE location - it has an incorrect value. Anyway I figured out I put a new field in my table that will put the current device in every record of an error. That way I can count the errors accurately. Now the HARD part… I want to make that when I enter the location [ID_RASKRSNICE] in my form IZVESTAJ – I fill my field ID_UREDJAJA in my table IZVESTAJ automatically (type of the device that is currently in that location (from the [RASKRSNICA] table – ID_UREDJAJ) .
I don’t know a different way of knowing what device was on what location WHEN. I can make a different table that will have the exact date of change of the device for example (DATE-LOCATION-DEVICE), but I don’t know how to make a query that will take into account the devices when they were on that location and then when they were not.
Here is my db for you to look and help if you can.