SQL Server Export Sample of 100 Records

I would like the step-by-step instructions on how to export (extract) about 100 Records from an existing SQL Server Database (Microsoft SQL Server 2008R2 64-Bit) that contains thousands of records. One of our software developers has requested that we extract a sample of the existing SQL Server Databse and forward (ftp) it to them for testing.

I have limited exposure/experience with SQL Server and have attempted to locate this process using SQL books without any success.

Who is Participating?
Vijaya Reddy Pinnapa ReddyConnect With a Mentor Commented:
Assuming the database name is AdventureWorks2008R2

1.Right-click the AdventureWorks2008R2 in SQL Management Studio
2.Go to Tasks and then Export data, you'll then see an easy to use wizard.
3.Your database will be the source, you can enter your SQL query

USE AdventureWorks2008R2 ;
SELECT FirstName, LastName
FROM Person.Person

4.Choose Excel(or anyone from the list) as the target
5.Run it at end of wizard
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
>about 100 Records from an existing SQL Server Database
Assuming you mean 100 records from a table

-- This will return some number around (above?) 100 random rows from any table
SELECT column1, column2, column3
FROM YourTable
TABLESAMPLE (100 rows)

Anthony PerkinsConnect With a Mentor Commented:
You can also use this approach (fix the obvious typo in xSELECT)
xSELECT TOP(100) Col1, Col2, Col3, ...
FROM YourTableName
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.