The following macro returns the message "Run-time error '1004' SQL Syntax Error". It works for SQL DML statements such as a "Select". Can one execute a stored procedure in ORACLE via an EXCEL macro, and if so, how?
The SQL "EXECUTE DROPTABLE" does work in SQL*Plus.


Many thanks!

Sub Drop_Table()
'
Dim str1 As String


str1 = "EXECUTE DROPTABLE"
'
sConn = "ODBC;DSN=ORADEV;UID=?;PWD=?;"
sConn = sConn & "DBQ=ORADEV"

Set oQt = Sheets("Sheet1").QueryTables.Add( _
Connection:=sConn, _
Destination:=Range("A1"), _
Sql:=Array(str1))
oQt.Refresh 'BackgroundQuery:=False

End Sub