3 Replies Latest reply: Jun 20, 2012 8:55 PM by Michael Solomovich RSS

    select values of listbox according to sql-similar condition in macro



      since a customer wants to combine the results of different selections, I am creating a macro to do this. the results of the selections are always a number of IDs, and they are supposed to be combined in different combinations (AND, OR, brackets, etc.). So I combined them to a sql-similar condition like this:


      ID in (0002572330,0003586436,0010221679) AND  NOT  (ID in (0001224962,0003167139,0010149590) OR ID in (0003614268,0001266346,0000956499) )


      (This is just an example, there can be much more IDs in each part. The maximum count of possible IDs is about 1.5 Mio.


      My problem is now the selection... I mean reducing the field (listbox?) containing the possible IDs to the ones in the statement. Do you know a way for that? (a way I tried was exporting all of the IDs to a textfile with this one column and using this textfile as a database where I execute a select statement containing the clause above, but this is slow and is very client dependent (32bit vs. 64bit and so on).


      Any ideas would be highly appreciated! :-)


      Thanks a lot,