Hi,
I'v only just downloaded MySQL and I'm trying to import a text file but i keep getting an error message:
"#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2009-08-24,00:00:00,2009-08-24,00:01:00,1,444,261,0,0,0 00:b0' at line 1"

It's prob something simple but I'm new to using it so I'm a bit confused!!

Thanks :)

Recommended Answers

All 2 Replies

can you send the whole section of code? By the way what does 00:b0 reference? If it is supposed to be a time the b does not belong.

Dates (including times) and strings need to be enclosed in single-quote delimitters.

So with a table with the following fields

Table: Person
Columns:
LastName - varchar(20)
FirstName - varchar(20)
Age - int
DateAdded - DateTime

A SQL insert statement would look like

Insert Into Person (LastName, FirstName, Age, DateAdded)
values ('Doe', 'John', 25, '2010-01-24')
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.