bcp_queryout.bat 376 B

1234567
  1. @call "%~dp0config2.bat"
  2. rem %1 = CSV-Dateiname [ohne Endung]
  3. rem %2 = SQL-Query
  4. bcp.exe %2 queryout "%SQL_TEMP:~1,-1%\%~1.csv" -S %SOURCE_SERVER% -d %SOURCE_DATABASE% -U %SOURCE_USER% -P %SOURCE_PASSWORD% -c -C 65001 -m 1000 -b 2000 -e "%SQL_LOGS:~1,-1%\%~1.queryout.log" > "%SQL_LOGS:~1,-1%\%~1.bcp1.log"
  5. rem echo %2
  6. rem type "%SQL_LOGS%\%1.bcp2.log" | findstr -v "1000"