select (select top 1 from list where id in 问题
SELECT Tb.ID,
(select top 1 from list where id in (tb.imglist)) as img,
FROM @indextable t, Tb where Tb.id =t.nid
and t.id between @PageLowerBound and @PageUpperBound order by t.id
问题是
(select top 1 from list where id in (tb.imglist)) as img 取了一个记录
tb.imglist 为varchar 类型,存储数据为:1001,1002
要从list表中取出一条记录,请大家帮帮忙
主要错误是系统会 tb.imglist 转换成int 而数据是1001,1002 不可能转换成功,有人遇到吗?