sql - 'MOD' is not a recognized built-in function name -


i wanted use mod function in sql server 2008r2 , followed link still got message:

'mod' not recognized built-in function name.

declare @m int set @m = mod(321,11) select @m 

error:

msg 195, level 15, state 10, line 2
'mod' not recognized built-in function name.

why can't use function link above?

the mod keyword exists in dax language (tabular dimensional queries), not tsql

use % instead.

ref: modulo


Comments

Popular posts from this blog

arrays - PHP Shopping Cart Variable and Object errors -

mysql - java.sql.SQLException Parameter index out of range (1 > number of parameters, which is 0) -