DECLARE @FilePath VARCHAR(1000) DECLARE @FileExists int DECLARE @nulltable TABLE ( foo integer) SET @FilePath = 'C:\my\path\somefile.csv' exec master.dbo.xp_fileexist @FilePath, @FileExists OUTPUT if not @FileExists = 1 begin declare @bcpCommand varchar(255), @Result int set @bcpCommand = 'bcp "DECLARE @nulltable TABLE ( foo integer); Select * from @nulltable" queryout "' + @FilePath + '" -c -t, -T -S ' exec @Result = master..xp_cmdshell @bcpCommand --, no_output end
Providing Rest Clients Nearly as Bad as Publishing SOAP Contracts
-
Even still, many developers and architects have continued to emotionally
cling to the SOAP bad old days, wherein the contracts between a server and
a cli...
5 years ago