A
A
Andrey Afonchenko2021-02-10 21:18:49
SQL
Andrey Afonchenko, 2021-02-10 21:18:49

How to create a query in Access to add n records?

I need to create a query that will add 10 records to a previously created table. But there are exceptions.

If you write like this, it says that a semicolon is missing.

INSERT INTO [Изделие] ( [название], [вес], [количество], [цена], [дата_изготовления], [фирма_изготовитель] )
VALUES 
('Название1', 1.1, 1, 1.1, #2001/01/01#, 'фирма1'),
('Название2', 2.2, 2, 2.2, #2002/02/02#, 'фирма2');


If you write like this, then it says that there are characters after the sql instruction.
INSERT INTO [Изделие] (
  [название], [вес], [количество], [цена], [дата_изготовления], [фирма_изготовитель]
) VALUES (
  'Название1', 1.1, 1, 1.1, #2001/01/01#, 'фирма1'
);

INSERT INTO [Изделие] (
  [название], [вес], [количество], [цена], [дата_изготовления], [фирма_изготовитель]
) VALUES (
  'Название2', 2.2, 2, 2.2, #2002/02/02#, 'фирма2'
);


I also looked at similar questions on many sites, but they offer to make another table and take data from it ... But this is not what I need.
Help me please.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question