Thanks Ahmed
I've already tried this method
osql -E -d NOMADE -S (local) -Q "select * from MyTable where ..." -o C:\File.txt
But I can't launch the command from a cmd window. THe T-SQL code must be in a stored procedure.
In addition, the return result is written on multiple lines in the output file.
I would like to write the return result of a select * command into one output line.
Thank you for helping me