web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

queryrange length limitation

(0) ShareShare
ReportReport
Posted on by

hi,

i am dynamically building comma separated values to be passed in query range. It would be very big string and may go upto 8000 characters.

Can anyone please let me know what's the maximum allowed length for the queryvalue in queryrange? Thanks.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    I am not sure, but I think its limit is about 2000 symbols

    I had a similar problem in the past.

    Solved it by using a separate table with values from the range and then using the EXIST JOIN clause on this table.

    It's the best solutions, actually.

  • Community Member Profile Picture
    on at

    Hi Qureshi,

    Can you elaborate your solution? I think it would be useful.

    Thanks.

  • Suggested answer
    Community Member Profile Picture
    on at

    I created a separate table and dump my range values in it. After that I make an exists join with the newly created table containing range values with my query.

    Hope this helps you

  • Community Member Profile Picture
    on at

    Is that the physical AOT table you created to dump those range values?

    i guess, if it's AOT table, then only you can add it in QBDS for joining with other table.

    am i right?

  • Suggested answer
    Community Member Profile Picture
    on at

    That totally depends upon your implementation either you can achieve via permanent or temporary table. Yes you are right, if you are implementing it via permanent table you can add it in QBDS.

    Hope this helps you.

  • Suggested answer
    Martin Dráb Profile Picture
    237,987 Most Valuable Professional on at

    A TempDB table would be a good choice in this case. Also, another alternative to using a comma-separated list of values in a single range is creating several ranges (each with its own value) for the same field.

  • Community Member Profile Picture
    on at

    Hi Martin ,

    can you please  provide example?

    Thanks

  • Verified answer
    Community Member Profile Picture
    on at

    Hi VDY,

    Refer to this blog post of mine regarding the solution suggested by Martin. You need to apply range on one field multiple times so that the result is an OR condition. This way you will not be required to pass a big string.

    http://basicax.blogspot.com.au/2012/12/x-code-to-define-or-conditions-in.html

  • Martin Dráb Profile Picture
    237,987 Most Valuable Professional on at

    I've shown an example in Lines for multiple headers.

  • ismaelivan Profile Picture
    578 on at

    It didn't work for me to do it multiple times 

    (as an example I send the same value several times, if I send it 2089 times it gives error)

    6076.c1.PNG

    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] The remote procedure call protocol (RPC) sequence of the incoming tabular data stream (TDS) is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.

    But if I send it 2088 times, it works!!


    ]

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans