Link to home
Start Free TrialLog in
Avatar of BeyondBGCM
BeyondBGCM

asked on

Sql to Excel

I want to fetch 300 columns data to excel, sheet , it is not working , can you suggest  me a simple way to do that ,

it is like a table has 300 columns , and i want to transfer data for all the columns to Excel sheet , can you please suggest that .
ASKER CERTIFIED SOLUTION
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi BeyondBGCM,

This is the very simplest method,but in different way.

1- First write the sql query in SQL Server Management Studio to fetch your required data.
2- select "Copy with Headers" in the results by right clicking on results.
3- Copy the data to excel.

Please check the attached screen shot.

User generated image
Avatar of BeyondBGCM
BeyondBGCM

ASKER

yes, you are correct , but it takes time , more than 30 minutes , to fetch 28000 rows .... and still not diaplaying
but above is manual method , and will require lot of time ..... the excel connection with sql is better, but this too is taking lot of time , more than 30 minutes  now .....
HI BeyondBGCM,

Yes, It will take time for downloading the number of records. (Number columns +  Number of rows).
In your case number of column is 300 and row is around 28000
How are you performing that operation?
In SSMS you can use the Export Data wizard by right-clicking on the desired database name then chose Tasks / Export Data...
User generated image