Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel 2002 Macro to Execute SQL Statement

Hi, I'm trying to write a macro in Excel 2002 to execute
the following (example) SQL statement:

insert into `C:\Documents and
Settings\User\Desktop\Test`.`Master$` (Apples, Pears,
Oranges,Store)
SELECT `Update$`.Apples, `Update$`.Pears,
`Update$`.Oranges, `Update$`.Store
FROM `C:\Documents and
Settings\User\Desktop\Test`.`Update$` `Update$`

The macro would run from inside the test.xls spreadsheet
which has already been defined as an ODBC Data Source. I
know that the SQL statements are correct, because I can
manually enter them into MS Query from inside Excel and
get the desired result.

I've tried reading the MS Visual Basic help for this, but
it's far above my expertise.

Any clues/suggestions would be much appreciated.

Thanks,
David

Reply
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
How do I execute a macro based on the value of a cell in Excel? brettopp Excel Discussion (Misc queries) 12 June 17th 06 01:27 AM
If Statement on Excel version 2002 biz Excel Discussion (Misc queries) 2 September 1st 05 06:21 PM
Execute Excel Macro using Java chrischern Excel Programming 0 June 29th 04 04:09 AM
access 97 to excel 97: execute macro automation TC[_3_] Excel Programming 2 July 15th 03 07:38 PM
access 97 to excel 97: execute macro automation Tom Ogilvy Excel Programming 0 July 13th 03 05:16 PM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"