日期:2014-05-18 浏览次数:20830 次
case when left(t_ring.prod_type,3) = '单排滚' or left(t_ring.prod_type,3) = '单排球' or left(t_ring.prod_type,3) = '双列球' or left(t_ring.prod_type,3) = '球柱联' then 1 end
declare @sql1 varchar(2000),@t table(sub_ring_id int) selecr @sql1='select sub_ring_id from t_ring '+' where '+@proc_estimate+'=1' insert @t exec(@sql1) declare ring scroll cursor for select * from @t ...
------解决方案--------------------
动态字符串,只能用游标执行生成动态字符,我经常用