I have very simple problem that I can\'t solve. I need to do something like this:
select distinct * from (1, 1, 1, 2, 5, 1, 6).
Anybody can
If you need an array, separate the array columns with a comma:
SELECT * FROM (VALUES('WOMENS'),('MENS'),('CHILDRENS')) as X([Attribute])
,(VALUES(742),(318)) AS z([StoreID])
Simplest way to get the distinct values of a long list of comma delimited text would be to use a find an replace with UNION to get the distinct values.
SELECT 1
UNION SELECT 1
UNION SELECT 1
UNION SELECT 2
UNION SELECT 5
UNION SELECT 1
UNION SELECT 6
Applied to your long line of comma delimited text
UNION SELECT
SELECT
in front of the statementYou now should have a working query