Msg 102, Level 15, State 1, Line 2 Incorrect syntax near ','
whats wrong with following query?
insert into table values (
(1001749039, 2010-10-29, 6, 1015583, 'B-1002-PYA-001-CM',
1062514, 2001422, 'y', 15.49, 2010-11-03, 'e', 2010-11-10, 3, 2010开发者_如何学编程-11-10 )
To start with you have an extra
(
.You might want to use [Table] instead of table in your query(if your table name is "Table") as "Table" it is a sql keyword.
And, it wouldn't throw an error but you might want to enclose your date fields in quotes i.e. use
'2010-10-29'
instead of2010-10-29
as SQL would interpret2010-10-29
as1971
if not enclosed in single quotes.
You have 2 opening parenthesis and only 1 closing one, for starters.
Try this:
insert into table values(1001749039, '2010-10-29', 6, 1015583, 'B-1002-PYA-001-CM', 1062514, 2001422, 'y', 15.49, '2010-11-03', 'e', '2010-11-10', 3, '2010-11-10' )
精彩评论