34,575
社区成员
发帖
与我相关
我的任务
分享
select * from product where sku in ('119-041','120-051','114-017','101-085','244-079','114-015','238-003','251-012','251-037','243-028','231-364','240-029')
--应该是
order by charindex(','+ltrim(sku)+',',',119-041,120-051,114-017,101-085....,')
select *,
dispseq = charindex(','+ltrim(product)+',',',119-041,120-051,114-017,101-085....,')
from product where sku in ('119-041','120-051','114-017','101-085','244-079','114-015','238-003','251-012','251-037','243-028','231-364','240-029')
order by charindex(','+ltrim(product)+',',',119-041,120-051,114-017,101-085....,')
select * from product where sku in ('119-041','120-051','114-017','101-085','244-079','114-015','238-003','251-012','251-037','243-028','231-364','240-029')
order by charindex(','+ltrim(product)+',',',119-041,120-051,114-017,101-085....,')
order by charindex(','+ltrim(product)+',',',119-041,120-051,114-017,101-085....,')