I want to insert data from an .sql file to my table in SQL. And all that with CMD.
My file contains that line:
INSERT INTO MYTABLE
VALUES (1, 2, 25, 'AK00008GP005L', '2008-04-19 11:31:00', '000', 1, 239.97, NULL, 'GH783MF', NULL, NULL);
It is possible?
Thanks.
You can use
SQLCMD(as suggested by Sibster). Assuming the file containing the query is calledinsert.sql, the command in its simplest form (using NT authentication) would look something like:To use SQL authentication: