?
Solved

Inserting multiple records into an SQL table using SQLCMD

Posted on 2014-02-27
2
Medium Priority
?
698 Views
Last Modified: 2014-03-01
Hi team,

I need assistance to create a sqlcmd script which will insert records from a .sql script, remove the done script then run the sqlcmd script to load the nexty script in the directory.

All responses acknowledged.
0
Comment
Question by:BernardGBailey
  • 2
2 Comments
 

Accepted Solution

by:
BernardGBailey earned 0 total points
ID: 39898230
I used the CMD box and


C:\>sqlcmd -S USER-PC -i "C:\gmpe data\mailbox 5000-5100.sql"
Changed database context to 'GoldMine'.

(1 rows affected)
Processed 5100 total records

where 'USER-PC' is the ServerName and the sql script in thw quotes.
0
 

Author Closing Comment

by:BernardGBailey
ID: 39898232
Found it myself
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

I have put this article together as i needed to get all the information that might be available already into one general document that could be referenced once without searching the Internet for the different pieces. I have had a few issues where…
Determining the an SCCM package name from the Package ID
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

840 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