ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SQL Statement Attaching to SQL Server (https://www.excelbanter.com/excel-programming/274762-sql-statement-attaching-sql-server.html)

Russ[_6_]

SQL Statement Attaching to SQL Server
 
I have a SQL statement that runs perfectly in SQL Server's
Query Analyzer (includes a COMPUTE ... BY statement). When
I run it in Query Analyzer it works, when I run it in
Excel's Microsoft Query box, it only returns the first
group and doesn't do a compute. Is there a limitation to
the extended SQL that I can use within Excel?

Thanks

Tom Ogilvy

SQL Statement Attaching to SQL Server
 
Probably Excel isn't the limitation, but maybe MSQuery or Jet. (or maybe
the database driver).

Perhaps you can try using ADO:

http://www.erlandsendata.no/english/vba/adodao/

frankly, I don't know if ADO uses Jet or not, but I believe there is a way
not to use Jet if that is the limitation.

--
Regards,
Tom Ogilvy

"Russ" wrote in message
...
I have a SQL statement that runs perfectly in SQL Server's
Query Analyzer (includes a COMPUTE ... BY statement). When
I run it in Query Analyzer it works, when I run it in
Excel's Microsoft Query box, it only returns the first
group and doesn't do a compute. Is there a limitation to
the extended SQL that I can use within Excel?

Thanks




Phobos

SQL Statement Attaching to SQL Server
 
SQL Server uses "Transact SQL" (often called TSQL), and is not compatible
with MS Query or MS Access.

P


"Russ" wrote in message
...
I have a SQL statement that runs perfectly in SQL Server's
Query Analyzer (includes a COMPUTE ... BY statement). When
I run it in Query Analyzer it works, when I run it in
Excel's Microsoft Query box, it only returns the first
group and doesn't do a compute. Is there a limitation to
the extended SQL that I can use within Excel?

Thanks





All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com