Inserting multiple records into an SQL table using SQLCMD

BernardGBailey
BernardGBailey used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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.

Author

Commented:
Found it myself

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial