• You could also try using the command line with BCP. Here's one for the AdventureWorks DB.

    At the command line cd to C:\Program Files\Microsoft SQL Server\90\Tools\Binn

    Then type

    bcp "SELECT CONT.FirstName,C

    ONT.LastName,ADDR.AddressLine1,ADDR.AddressLine2,ADDR.City,SP.StateProvinceCode,

    ADDR.PostalCode FROM AdventureWorks.HumanResources.Employee EMP JOIN AdventureWo

    rks.HumanResources.EmployeeAddress EA ON EMP.EmployeeID = EA.EmployeeID JOIN Adv

    entureWorks.Person.Address ADDR ON EA.AddressID = ADDR.AddressID JOIN AdventureW

    orks.Person.StateProvince SP ON ADDR.StateProvinceID = SP.StateProvinceID JOIN A

    dventureWorks.Person.Contact CONT ON CONT.ContactID = EMP.ContactID ORDER BY CO

    NT.LastName" queryout C:\Users\YourDesktop\Desktop\fileexport.txt -t "|" -S Server -T -c

    You'll have to modify below for your server,database,query,authentication type etc.

    You'll also want to checkout the rest of the parameters to tailor it specifically for your needs.