覓語 貉殊 れ螻 螳 れ願 . '2 / 2 * 10 - 5 / (7 - 2)' 願姥 螻壱 蟆郁骸襯 至 矩.
declare @sql nvarchar(1000) , @expression nvarchar(500) set @expression = '2 div 2 * 10 - 5 div (7 - 2)' set @sql = ' select rs.value(''.[1]'', ''money'') from ( select x.query(''' + @expression + ''') rs from (select convert(xml, '''') x) a ) t' print @sql exec(@sql) /* select rs.value('.[1]', 'money') from ( select x.query('2 div 2 * 10 - 5 div (7 - 2)') rs from (select convert(xml, '') x) a ) t */