+ Reply to Thread
Results 1 to 2 of 2

MSQuery question

  1. #1
    Registered User
    Join Date
    07-06-2006
    Posts
    5

    Question 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

  2. #2
    Harald Staff
    Guest

    Re: 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" <[email protected]> skrev i
    melding news:[email protected]...
    >
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1