MS SQL

G

Gregc.

Hi

I'm pretty new at using SQL in MS Access (I think it's referred to as
JetSQL). Anyhow, when I run a query (Union Select) it deletes all the
data from one of the tables. Would anyone know what this is happening?

Greg
 
J

John Vinson

Hi

I'm pretty new at using SQL in MS Access (I think it's referred to as
JetSQL). Anyhow, when I run a query (Union Select) it deletes all the
data from one of the tables. Would anyone know what this is happening?

Greg

No, and I'm all but certain that it ISN'T happening. A UNION query
doesn't even let you *update* any records in its constituent tables,
much less delete them.

Could you post the SQL of the UNION query that you suspect of deleting
data?


John W. Vinson[MVP]
 
M

Michel Walsh

Hi,


if it returns no record from one of the table (which is not the same as
deleting the records in one of the table), it is probably because these
records are found in the other table. UNION remove duplicated rows. Use
UNION ALL to get all the original rows, even those that are duplicated (in
the same table, or in another implied table).


Hoping it may help,
Vanderghast, Access MVP
 
G

Gregc.

John said:
No, and I'm all but certain that it ISN'T happening. A UNION query
doesn't even let you *update* any records in its constituent tables,
much less delete them.

Could you post the SQL of the UNION query that you suspect of deleting
data?

I've managed to work it out. Could you recommend some references ie
books on JetSQL?

Greg
 
Top