Valid select statements using OLEDB and Excel

D

DapperDanH

Hello,
I am looking for any info about valid select statements when using the OLEDB
with Excel.

Some quick questions I am trying to answer:
1. Can you say something like "Select Col1, Col2 from Worksheet"
2. Are "where'"statements valid? "Select * from Worksheet where col1 =
'dan'"


I did some googling and found great information but nothing centralized on
the subject. Is there a website or document or link anyone can recommend that
discusses this topic in detail?
Thanks in advance!

Dan H.
 
B

Bob Phillips

1. "SELECT * FROM [Sheet1$A:E]"

2. "SELECT * FROM [Sales$A:E] WHERE Name='Bob'"

Name being the column heading which will get treated as a recordset field.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

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