• @GrassHopper, problem is that client (GUI) has no control over the constraints or values for data as this is read-only GUI. Data is controlled by other means and user can only get the list from dB. And it seems the way to go is either parse the expression when quering constraints, or put those constraints in a separate table and get the values directly.

    @SSCrazy, the question is how to get those values you have listed in the first select statement: select 'myColumn in (''1D'', ''2D'', ''3D'', ''4D''))'. I'm not sure how to implement your suggestion :unsure: