ho provato a fare così:
declare @posizione_file varchar(100)
select @posizione_file = posizionefile from bulktemp
print @posizione_file
bulk insert prova
from '"@posizione_file"'
with ( formatfile = 'c:\test.fmt', batchsize = 10000 )
ma mi da questo errore
c:\test.txt
Server: Msg 4861, Level 16, State 1, Line 4
Could not bulk insert because file '"@posizione_file"' could not be opened. Operating system error code 123(The filename, directory name, or volume label syntax is incorrect.).
boh non riesco a definire la variabile @posizione_file, anche se me la printa in maniera corretta (C:\test.txt)

Rispondi quotando