所以这是我从查询中得到的表:
----------+----+-----------+----------------------
45678-sm-w| 18 |T-Shirts | Mens clothing
----------+----+-----------+----------------------
45678-sm-b| 5 |T-Shirts | Mens clothing
----------+----+-----------+----------------------
2189-L-Wh | 4 | Socks | Juniors Clothing
----------+----+-----------+----------------------
2189-L-Bl | 3 | Socks | Juniors Clothing
----------+----+-----+-----+----------------------
我想在报告中添加如下内容:
T-Shirts
----------+----+-----------+----------------------
45678-sm-w| 18 |T-Shirts | Mens clothing
----------+----+-----------+----------------------
45678-sm-b| 5 |T-Shirts | Mens clothing
----------+----+-----------+----------------------
Socks
----------+----+-----------+----------------------
2189-L-Wh | 4 | Socks | Juniors Clothing
----------+----+-----------+----------------------
2189-L-Bl | 3 | Socks | Juniors Clothing
----------+----+-----+-----+----------------------
我知道它是通过循环完成的,但无法弄清楚。谢谢!