I have basic SQL knowledge and wondering if it is possible to run a command or some type of script that will iterate through a query result and for each record, extract the fulltext data and save it to a text file on my local drive?
Thank you!
I have basic SQL knowledge and wondering if it is possible to run a command or some type of script that will iterate through a query result and for each record, extract the fulltext data and save it to a text file on my local drive?
Thank you!
You may use bcp utility :
DECLARE @SQL VARCHAR(1000)
-- EXPORT ITEMS
SET @SQL = ' BCP dbo.ITEMS out '
SET @SQL = @SQL + 'C:\FOLDER\ITEMS.CSV -T -t; -c -C UTF-8 -S'
EXEC xp_cmdshell @SQL