hi all
i want sql query result into text file (by using query) can any one tell me...
like this Select * from employee where empname='sachin' to 'c:\result.txt'
from sachin shah
You should be able to set 'Results to File' in Query Analyzer. To do this in Query Analyzer click Query->Results to File, or press Ctrl+Shift+T.
Then when you execute your query, it will go to a file of your choosing.
The other way is to simply copy and paste the results grid to Excel.
What version of SQL are you running? Are you trying to do this once or twice or are you trying to write a program that does this?