how to insert row in a .txt file from command prompt?

I am trying to export some data from sql but need to have some comment at the top of the file.
If you know a way to do it either in sql or in cmd line that would be very helpful.

2010-06-21T12:51:19Z

The edit fonctionnality is exactly what i was looking for.
I need to create a command line to add some rows.
How can I create a return in the command line?

53MalePrison2010-06-21T11:02:24Z

Favorite Answer

Use the union all clause of select sql to insert the comment.


SELECT 'This is my comment on top', 'This is here to match the number of columns'

UNION ALL

SELECT COLUMN1, COLUMN2 from TABLE

cool_clearwater2010-06-21T11:04:12Z

in cmd you can type edit ray.txt to open the file in a dos editor

the other way to do it is in debug
in command type

debug ray.txt

w 100 "this is the first line"

something like that anyway - edit is your best choice