Topic
  • 2 replies
  • Latest Post - ‏2013-08-07T11:03:37Z by CQAdmin
JIrvin
JIrvin
1 Post

Pinned topic Clearquest Query of Multiple Values

‏2013-07-26T14:11:53Z |

I have a field that I want to query on similar to the following format:

ID in (1111, 2222, 3333, 4444,.....nnnn)

If I only had a few values, I could easily use the "Or" and add multiple filters; however, I am doing this for over 700 values possible for a field. That is not possible or efficient a method. Can you tell me how to do this?

And before someone replies, I have already went to http://www-128.ibm.com/developerworks/rational/library/398.html and read it. It gave me exactly ZERO assistance in handling this particular case.

Please help.

  • pdubovitsky
    pdubovitsky
    376 Posts

    Re: Clearquest Query of Multiple Values

    ‏2013-07-27T15:29:03Z  

    There is no efficient method of putting 700 values into "IN" cause. Also, maximum number of values in the IN statement depends on the database vendor and version, and it might be as low as 256.
    Where did these values come from? Could it be possible that these values might be placed into a table (In this case you could use SQL JOIN instead) or had some attribute that could be used for filtering, etc?

    Pavel

  • CQAdmin
    CQAdmin
    103 Posts

    Re: Clearquest Query of Multiple Values

    ‏2013-08-07T11:03:37Z  

    Hello,

    If you want to create a query in CQ Client, then I do not have an answer for you. But yes this kind of case is very much possible with CQ APIs.

    ->You should have all these values in a txt file (That you can fetch from the DB using CQ APIs; if already there in the DB)

    ->Write a Perl code which uses CQ APIs, take values from this txt file one by one and Compare

    ->If condition matches, perform the desired task.

    Thanks.