2
我想導出一個PRINT命令的結果。我不想使用正常的SQL Server日誌。這可能與bcp?因爲以下命令不起作用。是否可以通過bcp將'PRINT'命令導出到文件中?
實施例:
SET @IPE = 'bcp PRINT ''Test'' queryout ' + @Path + '1b_Log_change_log_entry.txt -c -T'
結果:
Starting copy...
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC Driver 13 for SQL Server]BCP host-files must contain at least one column
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC Driver 13 for SQL Server]Unable to resolve column level collations
NULL
BCP copy out failed
NULL
'Print'不是查詢但是'Select'是..試試Select而不是Print ..''bcp Select''T est''查詢。' –
謝謝!好評!請把它作爲答案。只有這樣才能將此問題標記爲完整。 – WIbadeneralp
將其添加爲答案.. –