这段sql语句在vb6里面怎么写?
使用临时表实现字符串合并处理的示例SELECT id ,values=CAST(value as varchar(8000))
INTO #t2 FROM tb
ORDER BY id
DECLARE @col1 varchar(5),@col2 varchar(8000)
UPDATE #t2 SET
@col2=CASE WHEN @col1=id THEN @col2+'-'+values ELSE values END,
@col1=zo3,
qs=@col2
SELECT id,max(values) values FROM #t2 group by id
drop table #t2
go