'MOD'不是公认的内置函数名称 [英] 'MOD' is not a recognized built-in function name

查看:194
本文介绍了'MOD'不是公认的内置函数名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在SQL Server 2008R2中使用MOD函数,并遵循链接,但仍然收到消息:

I wanted to use MOD function in SQL Server 2008R2 and followed this link but still got the message:

'MOD'不是公认的内置函数名称.

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

DECLARE @m INT
SET @m = MOD(321,11)
SELECT @m

错误:

第155条消息的状态,状态10,第2行,
'MOD'不是公认的内置函数名称.

Msg 195, Level 15, State 10, Line 2
'MOD' is not a recognized built-in function name.

为什么我不能通过上面的链接使用此功能?

Why I can't use this function from the link above?

推荐答案

MOD关键字仅以DAX语言(表格维度查询)存在,而TSQL

The MOD keyword only exists in the DAX language (tabular dimensional queries), not TSQL

改为使用%.

参考: Modulo

这篇关于'MOD'不是公认的内置函数名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆