MS Query

G

Guest

I'm running Excel 2000. I was reading somewhere that I can type a SQL query
directly into the Excel OLE DB Query dialog box command text field, but I
can't see how to do that at all following the sequence to get external data.
I start at Data, Get External Data...it seems the only relevant choice is New
Database Query...but, I don't see any such access to a query dialog box
command text field where I could type in my SQL. Exactly how would I do this?
 
G

Guest

hi
I'm not sure what you read but you can do that but you have to go through
the wizard and you have to fight it.
on the tool bar...
Data>get external data>import database query.
a select data source dialog box will come up. select your data source>click
ok.
be sure to select the correct data source ie xl file, access, other, new ect.
A select database dialog box witll come up. select a database...any
database. click ok.
a choose columns dialog box will come up. click cancel then click yes on the
popup.
the MSQuery form will popup with an add table dialog box over it. cancel the
add table dialog box.
on the tool bar of the MSquery form, click SQL. the SQL box will ccom up.
here you can type your SQL statement.
note. If you go through the MSQ wizard, the wizard will write your SQL
statement for you like it was on record. I have never bypassed the wizard and
wrote the SQL Statement directly but i have modified it later.
I am using xl03 and have not tested in xl03 but in xl00, MSQ could not
handle complicated joins ie left join, right join, union join ect. I was
using Access and xl hand in hand at the time so if i needed complicated
joins, i wrote the query in access the used MSQ to draw the data from the
access query throught the MSQ wizzard.

hope this helped.
Regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top