You are missing closing parenthisis )
just before VALUES
.
Why won't this insert query work? [closed]
-
13-10-2022 - |
Question
I am very new in Microsoft SQL Server and I have the following problem.
On a database I have a very big table named VulnerabilityAlertDocument and I have to do an insert on this table.
So I have created the following insert query:
INSERT INTO VulnerabilityAlertDocument (
[Id], [VulnerabilityAlertId], [SourceId], [BugTraqID], [Title],
[StatusID], [CVE], [Published], [LastUpdated], [Remote],[Local],
[Credibility],[Classification],[Availability], [Ease], [Authentication],
[CVSS2_BaseScore], [CVSS2_TemporalScore], [CVSS2_BaseVector],
[CVSS2_TemporalVector], [CVSS1_BaseScore], [CVSS1_TemporalScore],
[NVD_CVSS2_BaseScore], [NVD_CVSS2_ComponentString], [ImpactRating],
[Severity], [EaseofExploit], [UrgencyRating], [LastChange],
[ShortSummary], [Impact], [TechnicalDescription], [AttackScenario],
[Exploit], [Credit], [URL], [AlertStatusId], [Type], [DetailLevel],
[Language], [dd]
VALUES ('10000', '10000', 'TEST', '12345', 'TEST TITLE', '46967', 'TEST CVE',
'2010-12-19 00:00:00.000', '2011-06-29 20:49:07.000', 'Yes','No',
'Vendor Confirmed', 'Boundary Condition Error', 'Always',
'No Exploit Available', 'Not Required', 'N.A.', 'N.A.', 'N.A.', 'N.A.'
'N.A.', 'N.A.', 'N.A.', 'N.A.', '6', '7,8', '0', '6,8', 'N.A.',
'TEST SHORT SUMMARY', 'TEST IMPACT', 'TEST TECHNICAL DESCRIPTION',
'TEST ATTACK SCENARIO', 'TEST EXPLOIT', 'TEST CREDIT', '46967', '-1',
'-1', '-1', 'NULL');
I followed the syntax as shown here: http://technet.microsoft.com/it-it/library/ms174633.aspx
But it doesn't work. When I execute that INSERT
command I obtain the following message error:
Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword *'VALUES'.*
Why? What could be the problem? How can I solve it?
Solution
OTHER TIPS
try this
INSERT INTO VulnerabilityAlertDocument ([Id], [VulnerabilityAlertId], [SourceId], [BugTraqID], [Title], [StatusID], [CVE], [Published], [LastUpdated], [Remote], [Local], [Credibility], [Classification], [Availability], [Ease], [Authentication], [CVSS2_BaseScore], [CVSS2_TemporalScore], [CVSS2_BaseVector], [CVSS2_TemporalVector], [CVSS1_BaseScore], [CVSS1_TemporalScore], [NVD_CVSS2_BaseScore], [NVD_CVSS2_ComponentString], [ImpactRating], [Severity], [EaseofExploit], [UrgencyRating], [LastChange], [ShortSummary], [Impact], [TechnicalDescription], [AttackScenario], [Exploit], [Credit], [URL], [AlertStatusId], [Type], [DetailLevel], [Language], [dd])
VALUES('10000', '10000', 'TEST', '12345', 'TEST TITLE', '46967', 'TEST CVE', '2010-12-19 00:00:00.000', '2011-06-29 20:49:07.000', 'Yes', 'No', 'Vendor Confirmed', 'Boundary Condition Error', 'Always', 'No Exploit Available', 'Not Required', 'N.A.', 'N.A.', 'N.A.', 'N.A.' 'N.A.', 'N.A.', 'N.A.', 'N.A.', '6', '7,8', '0', '6,8', 'N.A.', 'TEST SHORT SUMMARY', 'TEST IMPACT', 'TEST TECHNICAL DESCRIPTION', 'TEST ATTACK SCENARIO', 'TEST EXPLOIT', 'TEST CREDIT', '46967', '-1', '-1', '-1', 'NULL');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow