_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › 覓語伎螻

覓語
覓語 貉殊 れ螻 螳  れ願 . 

   '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
*/
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

瑚 朱 襷襾豪 磯 覲牛 讌. (企狩 襷貉)