The Dev Shelf
We have bcp utility in SQL Server we can easily write query results to notepad file.T-SQL
EXEC xp_cmdshell 'bcp "SELECT * FROM sys.objects" queryout "C:\ExportDataToNotepad.txt" -T -c -t,'
EXEC xp_cmdshell 'bcp "SELECT * FROM sys.objects"
queryout "C:\ExportDataToNotepad.txt" -T -c -t,'
That’s It.Enjoy Learning.
No comments:
Post a Comment