Solved

What is wrong with the following insert statement in SQL Server 2008?

Posted on 2016-09-21
4
40 Views
Last Modified: 2016-09-21
What is wrong with the following insert statement in SQL Server 2008?

tbl_CSL_ImportSV
---------------------------
field1  int
field2  varchar(5)
field3  varchar(11)
filed4  varchar(3)
filed5  varchar(6)
filed6  varchar(8)
field7  datetime
field8  numeric(19,2);
field9  varchar(13)
filed10  varchar(6)
filed11  varchar(6)

Insert into dbo.tbl_CSL_ImportSV
(985,'923','006928','233','054182','000','8/19/2016 0:00:00',1200000.00,'08/31/16','S','A38JMJ');

Msg 102, Level 15, State 1, Line 2
Incorrect syntax near ';'.
0
Comment
Question by:zimmer9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 11

Expert Comment

by:HuaMinChen
ID: 41809935
Try
Use your_schema
go

Insert into dbo.tbl_CSL_ImportSV
(985,'923','006928','233','054182','000','8/19/2016 0:00:00',1200000.00,'08/31/16','S','A38JMJ')

Open in new window

0
 
LVL 35

Accepted Solution

by:
Terry Woods earned 500 total points
ID: 41809936
I believe you're missing the word "values".

Try:
Insert into dbo.tbl_CSL_ImportSV 
values (985,'923','006928','233','054182','000','8/19/2016 0:00:00',1200000.00,'08/31/16','S','A38JMJ');

Open in new window

0
 

Author Comment

by:zimmer9
ID: 41809938
Terry you are ABSOLUTELY CORRECT. Thanks a million. You ROCK!!! You got me out of the woods.
0
 
LVL 11

Expert Comment

by:HuaMinChen
ID: 41809941
Try
Use your_schema
go

Insert into dbo.tbl_CSL_ImportSV
values (985,'923','006928','233','054182','000','8/19/2016 0:00:00',1200000.00,'08/31/16','S','A38JMJ')

Open in new window

0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question