Answer the question
In order to leave comments, you need to log in
How to create a checkbox on a condition in MS Access using SQL methods?
Hello!
There is the following table:
Client number (something like id) | Client's Product (Website, Business Card, Banner, TV) | Income | Flag (new field)
The essence is this: all uploads are line by line. One customer number can have several products. I need to make one more field in which one would be put down for a client who has a TV product and one would also be put down for every other product of this client (it is simply marked as with TV in each line)
And for the rest 0
Please tell me How can this be done in Access. There is a lot of data, Excel is not an option :)
Thank you!
Answer the question
In order to leave comments, you need to log in
The first query is to fetch unique customer IDs that have product="TV" :
SELECT DISTINCT Таблица1.КлиентИД
FROM Таблица1
WHERE Таблица1.Продукт="ТВ";
UPDATE Таблица1 SET Таблица1.Флажок = 1
WHERE КлиентИД IN (SELECT * FROM Запрос1);
UPDATE Таблица1 SET Флажок = 1
WHERE (КлиентИД In (SELECT DISTINCT КлиентИД
FROM Таблица1
WHERE (Продукт="ТВ")));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question