1

Topic: Delete query

Good afternoon.
There is a reference manual of clients sklient (klient_id, , contacts).
There is Zapros1 who forms the list of unnecessary clients.
It is necessary to create delete query which will delete those who got in Zapros1 from the reference manual of clients.
I write the code:
DELETE sklient.*
FROM sklient
WHERE (((sklient.klient_id) = [1]! [klient_id]));
But at performance demands to enter the code of the client manually (fig. see);
And it is necessary to me that the code of the client undertook from Zapros1.
In what an error?

2

Re: Delete query

Incorrect syntax.
The software perceives this text not as the link to request, and as a variable for manual input.

3

Re: Delete query

Try so

DELETE sklient.*
FROM sklient, Zapros1
WHERE sklient.klient_id=1.klient_id;

Or so

DELETE sklient.*
FROM sklient INNER JOIN Zapros1 ON of Tablitsa1.klient_id = [1].klient_id;

4

Re: Delete query

Tauri, seemingly, that your Zapros1 does not produce klient_ID (for example, in the designer of request the field has been included, but the tick "the Output to the screen" therefore the code on removal cannot find this field is not delivered.

5

Re: Delete query

Made.
It turned out here so:
DELETE sklient.*
FROM sklient
WHERE (((sklient.klient_id) In (SELECT klient_id FROM Zapros1)));