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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL.REQUEST Function for Excel - Very Useful!!!

Status
Not open for further replies.

Bowers74

MIS
Nov 20, 2002
1,085
US
I would like to inform you about an Excel function not many know about that helps you to return smaller amounts of data from a database:

The SQL.REQUEST() function gives you SQL Query functionality directly in Excel!

The use of this Function is a little in depth, so I am not going to try to explain it all in this thread.

If you want to know more about this function then go to the following website:


You can download an example Workbook at this link:


This is a great example and definately worth looking into. ;-)

You will need to activate or install the ODBC Add-in (XLODBC.XLA) to be able to use this function.


For those of you who have Excel XP, you need to know that the Excel ODBC Add-in is no longer included with Office XP, but you can download it from MS at this link:




I have experienced that this function works great for returning smaller amounts of data from Access databases. I say smaller amounts, but you can also return relatively larger amounts as well. But be warned, as with every Query process, the larger the data, the longer it takes to return the data.

I use this function to create "VLOOKUP()'s" from Access database. It has also come in really handy when creating reference tables for pivot tables and charts as well! [thumbsup2]


Enjoy, and have fun!


I hope this helps!

Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
I can't believe that no one is interested in this?!! [bugeyed]

Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 

I will definitely have a look at this as soon as I get a chance.....

Thanks
 
Yes, this does indeed look very interesting - I will try it when I have a minute but one quick question - if the workbook is on autocalculate will this then reread in the data from the database automatically?

At the moment I have one computer on a network which writes prices to an access database, other computers can then read in this data in from this database. There are quite a few ways of skinning this particular cat but at the moment I use the external data source function in excel and refresh the data every minute. But, if I used this function would I even have to do that - would it automatically do this for me (and probably quicker too)?
 
You would only have to press F9 to update the data in the Excel sheet. But remember that this should really be used for returning small amounts of data to the Excel sheet (i.e. not too many different query types).

Good Luck!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top