Solved

Inserting multiple records into an SQL table using SQLCMD

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Introduction People like FTP.  It's a solid, stable, robust protocol for quickly transferring files between two hosts using TCP/IP.  In most cases it's much faster than SMB or CIFS, and certainly much easier to set up between organizations.  This…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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