Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006

    Question Unanswered: Max Number of Expressions in ORDER BY


    I haven't been on the forum in a while but I have stumbled across a new issue and could use some help.

    I have some VB code that I use to programatically create a string of SQL for an INSERT INTO query. I know that there are no issues with the code or basic structure of the SQL statement as this has functioned many times in the past without issue.

    However, I am now being asked to perform this same analysis on a bigger data set and this is leading to a problem. I am receiving error 3088 with the text "too many expressions in ORDER BY clause - jetter40.chm". This does make sense as I would be asking for the ORDER BY clause to include about 167 expressions. In the past I have only had to use about 30-40 expressions. Through some testing it seems that this error occurs somewhere around 100 expressions in the ORDER BY clause but I can't find much reference to this type of issue through google searches.

    Has anyone run into a way around this before? I am open to accomplishing the ORDER BY clause programatically if this is something Access SQL just can't handle but I haven't been able to wrap my head around it so far.

    Also, I am using MS Access 2010 but the underlying data tables are stored in Access 2000 file formats.

    Thanks in advance!

  2. #2
    Join Date
    Aug 2012
    Sounds like you need to break up the query into peices. Perhaps run the query with half of the expressions and use that to make a new table or fill in one, then finish the job using the new table.

Posting Permissions

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