ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   I need to execute the SQL.Request with SQL strings larger than 512 (https://www.excelbanter.com/excel-programming/322651-i-need-execute-sql-request-sql-strings-larger-than-512-a.html)

xavier

I need to execute the SQL.Request with SQL strings larger than 512
 
The SQL.Request external function in Excel 2003 has an SQL string too short.
I need to execute the SQL.Request with SQL strings larger than 512 or more.

Is there a way to do it?
How can I do it?

Jake Marx[_3_]

I need to execute the SQL.Request with SQL strings larger than 512
 
Hi Xavier,

Xavier wrote:
The SQL.Request external function in Excel 2003 has an SQL string too
short. I need to execute the SQL.Request with SQL strings larger than
512 or more.

Is there a way to do it?
How can I do it?


You could change your methodology to use a QueryTable instead of worksheet
functions. To do this, select Data | Import External Data -- New Database
Query, then follow the prompts. It's pretty easy and powerful. If you need
more than that will do, you may have to look into programmatically
retrieving your data using VBA code.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Tim Williams

I need to execute the SQL.Request with SQL strings larger than 512
 
What database? Look into ADO.

Tim


"Xavier" wrote in message
...
The SQL.Request external function in Excel 2003 has an SQL string too

short.
I need to execute the SQL.Request with SQL strings larger than 512 or

more.

Is there a way to do it?
How can I do it?




Tom Ogilvy

I need to execute the SQL.Request with SQL strings larger than 512
 
Have you tried making the argument for the sql string be a reference to
multiple cells (continuous block) and broken up your sql string so that each
part is less than 155 characters.

I haven't tested this, but it seems to me it does work.

--
Regards,
Tom Ogilvy

"Xavier" wrote in message
...
The SQL.Request external function in Excel 2003 has an SQL string too

short.
I need to execute the SQL.Request with SQL strings larger than 512 or

more.

Is there a way to do it?
How can I do it?




xavier

I need to execute the SQL.Request with SQL strings larger than
 
Thanks Tom for your answer, but I have another problem right now, becasue I
tray to ejecute the commnad with a simple select statement and I received a
syntax error message. As a mather of fact, I am not sure if the syntax that I
am Using is ok.

"Tom Ogilvy" wrote:

Have you tried making the argument for the sql string be a reference to
multiple cells (continuous block) and broken up your sql string so that each
part is less than 155 characters.

I haven't tested this, but it seems to me it does work.

--
Regards,
Tom Ogilvy

"Xavier" wrote in message
...
The SQL.Request external function in Excel 2003 has an SQL string too

short.
I need to execute the SQL.Request with SQL strings larger than 512 or

more.

Is there a way to do it?
How can I do it?






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

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