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
Solved

Inserting multiple records into an SQL table using SQLCMD

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Office Web Apps/ SharePoint 2013 1 97
Logs to delete in Windows VCenter server ? 11 769
Linux server cannot access samba share 12 112
sccm importing drivers 4 44
Introduction: Sometimes when I receive a call from my users to solve their problems it is very difficult for me to found their computer IP address. Even finding their computer Host to provide remote support can be a problem.  So I resorted to Goo…
Microsoft has released remote PowerShell capabilities to all commercial Office 365 customers. So you can be controlled via PowerShell and not from the Office 365 admin center Download Windows PowerShell Module for Lync Online http://www.micros…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

839 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