Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT INTO *.XLS

Status
Not open for further replies.

tennessee

Programmer
Feb 25, 2001
8
0
0
US
I need to know if there is a way to select * from sometable into (excel spreadsheet) without using dts wizard.

Thanks for any help!
 
Hi,
You can do either of two ways:

1) bcp out the data into a text file and then open that text file into MS-Excel

2) Open a MS-Excel workbook and import data from SQL server, using Data--> Get External Data... from the menu.

RD
 
FoxPro does this very easily using ODBC to interface data on SQL server. Here is sample syntax in FOXPRO:

SELECT * FROM xyz INTO CURSOR Cxyz
COPY TO xyz.xls XL5

Nice thing is you can then create an executable which can be run again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top