Parsing a Pairs of Values in a String While Preserving Order


Introduction

In a project I’m currently working on, I need to modify a stored procedure that returns a list of items based on criteria set by the procedure parameters. The new requirement is as follows: the stored procedure must be able to retrieve the list of items that should be included in the result set. That is, if the list is empty, the goods selected according to the given criteria are included in the result set. If the list is not empty, then the result set includes only items from the list.

Moreover, in the list are set pairs of