Reputation: 91
Type of date : datetime2
INSERT INTO Event_test (date, Object, ASDU, IOA)
VALUES(10/07/2016 12:00:00.523, TMC1DEFCAL, 65, 408)
Syntax error near '12'
Upvotes: 0
Views: 66
Reputation: 403
Use ISO format date with single quotes. It should work.
INSERT INTO Event_test (date, Object, ASDU, IOA) VALUES
('2016-10-07 12:00:00.523', 'TMC1DEFCAL', 65, 408);
Upvotes: 1
Reputation: 1269445
You need single quotes. I would also recommend ISO standard formats:
INSERT INTO Event_test (date, Object, ASDU, IOA)
VALUES('2016-10-07T12:00:00.523', 'TMC1DEFCAL', 65, 408);
Single quotes are also needed for string values.
Upvotes: 2