View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bridges[_2_] Bob Bridges[_2_] is offline
external usenet poster
 
Posts: 257
Default Revisit an older post, looking for SQL help on adding range data f

I guess you're using a SQL query to manipulate data via Data, Import
External Data, New Database Query, right? I've fooled with this only a few
hours' worth, but IIRC a named range in Excel can serve as a table name
in such a query. In a SQL query the table name is the part that comes
after the FROM clause. Ok, table names can appear elsewhere, but in
a basic query it's the word after FROM, which in the below example is
"BG". So you're pulling data from the named range "BG" and getting
ready to put it somewhere else.

Whoever wrote those instructions apparently supposed you know enough
SQL to write or at least "adapt" your own queries. If all you were
missing was the connection between Excel named ranges and SQL
tables, maybe you do. But if you don't savvy SQL, you'll need someone
to get you over the hum. Do you want to pursue that angle, or do you
know where you are now?

--- "Rick" wrote:
This post (http://groups.google.com/group/micro...xcel.worksheet.
functions/browse_frm/thread/6fb68debb1f35f9b/75b4836984fd768e?hl=en
&lnk=gst&q=comcine+data+from+several+worksheets#75 b4836984fd768e)
answers the question, but I can't figure out how to apply the model
displayed to my scenario. I created named ranges, and get to the point of:
"Replace the displayed SQL code with an adapted version of this:". Now,
all bets are off.

My named ranges on the 4 worksheets a
BG
Chicago
Lisle
Schaumburg

This is the code that appears in the SQL query window:
SELECT BG.`Most Recent Employer`, BG.`Start Date`, BG.`Last Name`,
BG.`First Name`, BG.Title, BG.`Previous Employer`, BG.Title1,
BG.`Email Address`, BG.`BBB Office`, BG.Consultant
FROM BG BG
ORDER BY BG.`Most Recent Employer`

How do I create as the author describes as "an adaped version of this"?
I'd like to get it to work. but how should the SQL code look with the
additional named ranges added? Having trouble figuring out the
nomenclature.