SQL中字段缺位时的模糊查找

//缺一位 

select top 1 * from PRO_Precisionstretch_Merge where rodno like @rodno+'_' and right(rodNO,1) > 'G' order by rodNO asc

 

//缺多位

select top 1 * from PRO_Precisionstretch_Merge where rodno like @rodno+'%' and right(rodNO,1) > 'G' order by rodNO asc

 

posted @ 2011-08-15 16:55  风一样的大叔  阅读(166)  评论(0)    收藏  举报