Thou from Signapore asked the following question:
Question: Can I execute a SQL statement directly from a function within a cell in Excel?
Answer: Yes you can. If the statement is a select statement you can use the SQLQueryValue function. If you want to use another statement, e.g. an insert or update SQL command, you can use the SQLExecute function. Note that for both functions a Volatile function is available too (e.g. SQLQueryValueVolatile). The Volatile functions will always execute when Excel calculates.
See:
SQLQueryValue:
http://www.oraxcel.com/cgi-bin/yabb2/YaBB.pl?num=1135155904