#1   Report Post  
Posted to microsoft.public.excel.misc
NiNi
 
Posts: n/a
Default SQL? Index? Excel?

Haven't done programming for a while-rusty now. Need help from any of you:
1) Trying to retrive data from SQL server to Excel by VBA. The SQL database
is huge, which has over 50,000 data in it. But only 2 columns have index. For
example, I want to output all the employee's name whose salary is below
10,000, and the group between 10,000 and 20,000, while the salary does not
have index, but employee's name has index. As the database is huge, it takes
forever to get the data. Anyone has idea to improve the speed? Or any
alternative?

2) trying to run the macro and retrive some data into Excel sheet for
selection. For example, I have 1000 employee use the bank HSBC, and another
2000 people use Whacovia. How can I get only one HSBC and one Whavocia into
Excel cell for a selection?

Thank you very much and appreciate your ideas.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default SQL? Index? Excel?

When you say "over 50,000 data", do you mean "over 50,000 rows"?
That's nowhere near being a "huge" database, so if performance is
unacceptable there must be serious problems with the design (or
maybe it's just hosted on inadequate hardware).

For the types of data extraction you mention I would have thought
that MS Query would be a suitable tool for getting the data into
Excel.

Andrew

NiNi wrote:
Haven't done programming for a while-rusty now. Need help from any of you:
1) Trying to retrive data from SQL server to Excel by VBA. The SQL database
is huge, which has over 50,000 data in it. But only 2 columns have index. For
example, I want to output all the employee's name whose salary is below
10,000, and the group between 10,000 and 20,000, while the salary does not
have index, but employee's name has index. As the database is huge, it takes
forever to get the data. Anyone has idea to improve the speed? Or any
alternative?

2) trying to run the macro and retrive some data into Excel sheet for
selection. For example, I have 1000 employee use the bank HSBC, and another
2000 people use Whacovia. How can I get only one HSBC and one Whavocia into
Excel cell for a selection?

Thank you very much and appreciate your ideas.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
Sharing read-write Excel 2003 files ttt8262 Excel Discussion (Misc queries) 0 April 1st 06 09:39 PM
Extension to Excel INDEX function Adam Slim Excel Worksheet Functions 0 December 2nd 05 10:39 AM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Opening two separate instances of Excel Ron Bishop Excel Discussion (Misc queries) 2 August 4th 05 05:30 PM


All times are GMT +1. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"