Impressive work @mithrandie and such a fanstastic library!
I was wondering whether the following scenario is already possible or how difficult it would be to implement something along these lines:
Example: Join Each Product to Its Tags
Suppose you have a table:
products
---------
id name tags
1 Phone electronics,mobile
2 Laptop electronics,computer
3 Shoes fashion,footwear
You want to get one row per tag per product:
SELECT
p.id,
p.name,
s.value AS tag
FROM
products p
CROSS APPLY STRING_SPLIT(p.tags, ',') AS s;
| id |
name |
tag |
| 1 |
Phone |
electronics |
| 1 |
Phone |
mobile |
| 2 |
Laptop |
electronics |
| 2 |
Laptop |
computer |
| 3 |
Shoes |
fashion |
| 3 |
Shoes |
footwear |
Impressive work @mithrandie and such a fanstastic library!
I was wondering whether the following scenario is already possible or how difficult it would be to implement something along these lines:
Example: Join Each Product to Its Tags
Suppose you have a table:
You want to get one row per tag per product: