To solve the Problem i wrote it inside a Query for create the file in .sql to do exactly i want
here's the code (The name for it is SQLQuery1.sql)
USE DataBase;
DROP TABLE Texample
CREATE TABLE Texemple (
FirstName varchar(10),
LastName Varchar(15),
Email Varchar(20)
);
BULK INSERT Texemple FROM 'C:\TxtFile1.txt' WITH (FIELDTERMINATOR = '","')
After we gonna create the .bat Script
@echo off@echo off
cls
set /p sname= ServerName
set /p dbname= DataBase
set /p Username= User
set /p pwd= Pass
set /p choice=ARE YOU SURE TO EXECUTE SCRIPTS in %DbName% (y/n) ?
if '%choice%'=='y' goto begin
goto end
:begin
if exist _Deploy.txt del _Deploy.txt
@echo on
sqlcmd -S <servername> -U <user> -P <pass> -d <database> -I -i C:\SQLQuery1.sql >> _Deploy.txt 2>&1
@notepad _Deploy.txt
</database></pass></user></servername>
Finally the Batch Script runs the .sql script to import our data file (.txt) in the Database