Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!
@echo off SETLOCAL ENABLEDELAYEDEXPANSION bcp tbltest out "C:\Data\CAAGIndividualsFile.TXT" -c -SQLINST\T -testuser -Ptest call :StripBlankLines CAAGIndividualsFile.TXT goto :eof :StripBlankLines For %%x in ("%~1") do set OutF=temp_%%~nx.txt if exist "%OutF%" del "%OutF%" for /F "usebackq delims=" %%B in (%*) do ( call :TrimWS %%B if not "!Line!"=="" >>"%OutF%" echo !Line! ) goto :eof :TrimWS set Line=%* goto :eof :End
@echo off setlocal EnableDelayedExpansion bcp tbltest out "%TEMP%\CAAGIndividualsFile.TXT" -c -SQLINST\T -testuser -Ptest findstr /V /R /B /E /C:" *" "%TEMP%\CAAGIndividualsFile.TXT">"C:\Data\CAAGIndividualsFile.TXT"
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.