Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

sql

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JT - 13 Sep 2007 23:32 GMT
I want to run a sql statement in Excel that will extract data from an Access
database.   I have found this code but have a question.  Value1, value2, etc.
are all part of an array.  How would I modify this code to use the values in
the array?  Depending on who is using it, the total number of items in the
array will change from person to person or from date to date.  Thanks.......  

Thanks....

SELECT column_name FROM table_name
WHERE column_name IN (value1,value2,..)
Signature

JT

Tim Williams - 14 Sep 2007 03:45 GMT
SQL="SELECT column_name FROM table_name " & _
          "WHERE column_name IN ('" & Join(arrCols,"','") & "')"

where arrCols is your array of column names.

Tim

>I want to run a sql statement in Excel that will extract data from an
>Access
[quoted text clipped - 10 lines]
> SELECT column_name FROM table_name
> WHERE column_name IN (value1,value2,..)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.