![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I got this error when I was trying to run BCP from DOS command. SQLState = S1000, NativeError = 0 Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file The following is my code. I got results from by running the query alone. --sp_spaceused docphrase DECLARE @strsql varchar(500), @str varchar(500) DECLARE @x int, @y int SET @x=907745897 SET @y=907745901 SET @strsql = '"select * FROM FAST_INT_0005.dbo.DocPhrase (nolock) where docPhraseid > ' + converT(varchar,@x) + ' AND docphraseId < ' + converT(varchar,@y ) + '"' SET @str = 'bcp '+ @strsql + ' queryout -oC:\BigInt\doc_1.txt -SQAIMGSQL01 -T' PRINT @str EXEC master..xp_cmdshell @str I appreciate if anyone could help me with this issue. Thanks, Lianne |
![]() |
| Thread Tools | |
| Display Modes | |
| |