LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default using SQL against Excel tables

How can I just use SQL against tables right in Excel? Why won't something
like this work? Why would I have to open up a channel when I just want to
work with an excel table?

Dim Querystring As String
Dim DatabaseName As String
DatabaseName = "testtable"
QueryString = "SELECT * FROM testtable.field_three WHERE
(testtable.field_one="yes")"
Chan = SQLOpen(DNS??& testtable)
SQLExecQuery Chan, Querystring
Set Output = Worksheets("Sheet1").Range("A1")
SQLRetrieve Chan, Output, , , True
SQLClose Chan
End Sub








--
Please contact me by email if you have an answer to this question. I
appreciate it.
 
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
concatenate tables into html tables urlocaljeweler Excel Discussion (Misc queries) 1 December 11th 09 08:15 PM
Excel tables vs. system tables FUBARinSFO[_2_] Excel Programming 3 January 27th 08 09:13 PM
Building pivot tables in Excel 2007 based on existing pivot tables? [email protected] Excel Discussion (Misc queries) 4 December 26th 07 08:05 PM
Any way to programmatically make pivot tables behave more like data tables? Ferris[_2_] Excel Programming 1 August 24th 07 06:20 PM
Extracting/Exporting HTML Tables or PDF Tables into Excel [email protected] Excel Programming 3 July 25th 06 09:57 AM


All times are GMT +1. The time now is 06:08 PM.

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"