Solved

Inserting multiple records into an SQL table using SQLCMD

Posted on 2014-02-27
2
605 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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

When you are trying to access the server, have you ever encountered "The terminal server has exceeded the maximum number of allowed connection" error?  or "The user is attempting to log on to a Terminal Server in Remote Administration mode, but the …
Experts-Exchange users below are the steps you can follow to upgrade your Lync server to latest CU's or cumulative updates. Note: Perform it during non-production hours.   Step 1: Backup your lync and SQL server database. Follow below article: h…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now