Append Query error? Characters found after end of SQL statement?

N

Nathon Jones

Hi. I'm, trying to run an Append Query and have the following in my design
SQL view:

INSERT INTO store_inventory VALUES('4054', '1', 'PRODUCT TITLE 14CM',
'4054.jpg', '4.44', 'Product description, 14cm', '55', '5', '0.00', '',
'62\n', '0');
INSERT INTO store_inventory VALUES('4053', '1', 'ANOTHER PRODUCT TITLE
4.5CM', '4053.jpg', '2.64', 'PRODUCT TITLE 4.5CM', '55', '13', '0.00', '',
'62\n', '0');

When I try to save the query, I receive the following error:
"Characters found after end of SQL statement?"

Can someone point out hte obvious to me? Thanks.
Nath.
 
B

Brendan Reynolds

Those are two separate SQL statements. JET does not support more than one
SQL statement in a query. You'll need to save your two statements as two
queries. You can, of course, use VBA code to execute the two queries one
after the other.
 
N

Nathon Jones

Hi Brendan,

Thank you for your prompt reply.

Was just checking Google there and I see that I can't run multiple INSERT's?
Is that correct?

I have 800+ products I need to INSERT...can you help me with that VBA code
in order to be able to insert multiple records?

Really appreciate it. Thanks.
Nath.
 
N

Nathon Jones

Hi Brendan,

A bit more background information...

My source is a .sql dump file (seems to be a text file with extension .sql),
which was provided by the ISP as a back-up of our MySQL database. This is,
unfortunately, the only way they will provide the data.

Within this file are multiple INSERT INTO statements, one for each record.

I need to know how to append these records into an existing table in Access
because there are 800+ and I really don't want to have to create an APPEND
query for every single entry!

What about a CREATE TABLE query? Will this allow the multiple insertions?

Hope you can help. Thanks.
Nath.
 
B

Brendan Reynolds

The solution is likely to depend on where the data is coming from. If the
data is in a format that can be imported or linked by Access, then the
solution might be a single append query.
 
B

Brendan Reynolds

Don't you have another thread going on this same subject?

It might be better to stick with that thread, as some of the people who have
offered suggestions in that thread are clearly familiar with MySQL. I am
not.

Any text file can be parsed, of course, but text-parsing code tends to be
quite specific to the particular format of the file being parsed, and as
I've said, I'm not familiar with that format.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top