H
HH
To append a single record, without getting a warning when a record
already exists, I found out the following syntax works fine as Query
in MS Access:
first create a simple 'products' table...
CREATE TABLE products (code TEXT(10), description TEXT(100));
then try this...
INSERT INTO products (code, description)
SELECT code, description FROM (SELECT Count(*) AS X, 'ABC' AS code,
'Product ABC' AS description FROM properties) as sub
WHERE code NOT IN (SELECT code FROM products WHERE code = sub.code);
somebody having a better solution for this?
already exists, I found out the following syntax works fine as Query
in MS Access:
first create a simple 'products' table...
CREATE TABLE products (code TEXT(10), description TEXT(100));
then try this...
INSERT INTO products (code, description)
SELECT code, description FROM (SELECT Count(*) AS X, 'ABC' AS code,
'Product ABC' AS description FROM properties) as sub
WHERE code NOT IN (SELECT code FROM products WHERE code = sub.code);
somebody having a better solution for this?