Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MSQuery question


I am using MS Query to retrieve information from a database, and return
the data to excel. Normally this works fine, however if the db field
contains more than 32K characters, Excel crashes.

Is there a way to specify in my database query not get more than the
first 2500 characters of a particular field?

Thanks


--
LarryLL
------------------------------------------------------------------------
LarryLL's Profile: http://www.excelforum.com/member.php...o&userid=36136
View this thread: http://www.excelforum.com/showthread...hreadid=560453

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default MSQuery question

Hi

In Query, click the SQL button and you see the real expression, something
like

SELECT T_Table.ID, T_Table.Description
FROM T_Table

Edit it to read something like

SELECT T_Table.ID, LEFT(T_Table.Description, 2500)
FROM T_Table

I say "something like" because the expression LEFT may not work on all
databases, this is tested on Access and I can't get to other databases on
this computer. Oracle uses SUBSTR for similar things. Try-and-fail or Google
up what word your database driver uses on this.

HTH. Best wishes Harald

"LarryLL" skrev i
melding ...

I am using MS Query to retrieve information from a database, and return
the data to excel. Normally this works fine, however if the db field
contains more than 32K characters, Excel crashes.

Is there a way to specify in my database query not get more than the
first 2500 characters of a particular field?

Thanks


--
LarryLL
------------------------------------------------------------------------
LarryLL's Profile:

http://www.excelforum.com/member.php...o&userid=36136
View this thread: http://www.excelforum.com/showthread...hreadid=560453



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
msquery patti Excel Discussion (Misc queries) 4 January 17th 08 03:17 AM
msquery troestj Excel Discussion (Misc queries) 1 September 25th 06 02:31 PM
MSQuery Lac Excel Worksheet Functions 2 June 14th 06 08:49 AM
MSQUERY...My Exact question (Excel 2000) SEAN DI''''ANNO New Users to Excel 1 April 7th 06 03:35 PM
Importing Access record into Excel using MSQUERY question Harry[_7_] Excel Programming 3 February 14th 05 02:36 PM


All times are GMT +1. The time now is 05:04 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"