How can I perform a table dump to give to the client?
To try and provide as much info:
- I am using both SQL 2005 and 2008
- Existing databases are simple, like POS, Inventory, Tracking types
- I was asked to provide a table dump (of a certain table in a certain database in a certain server)
- No more info provided by client–just that they would like a table dump
- What is a “table dump”, what formats are available, how do I create one to send to client?
If I missed more info, please let me know — I’m really after the generic kind of table dump generation (if possible through T-SQL, better 🙂 )
I am assuming your client wants the file in a format that they can work with. In my experience this is something that can be opened in Excel either natively or as a CSV. My first suggestion would be to clarify the requirements with the client.
For now, let’s assume they want a CSV file. Assuming you have Sql Server Management Studio, you could use the Import/Export wizard to export the contents of a database (selecting a specific table) to a variety of formats including Flat File and Excel. Right click on the database, choose tasks, export data and follow the steps.
This link shows how to use Import/Export wizard and the BCP command line tool. The BCP command line tool would be a more repeatable and scriptable option. http://www.sqlservercurry.com/2011/01/sql-server-export-table-to-csv.html
If you have SSIS running on the server or available, you could use that to create a package which would be another reusable solution.