• SQL does not have anything native to send anything to file.

    something external like bcp or sqlcmd, a Common Language Runtime Procedure, Powershell or a proper programming language have the ability to do what you are asking.

    I've seen some nice scripts posted in powershell forum, if you are comfortable with that.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!