“Cannot call methods on BIGINT” error

≯℡__Kan透↙ 提交于 2019-12-11 23:37:58

问题


I have a T-SQL query that I've been beating on for a while, it seems simple, but I get an error in the query designer when I try to execute it:

SELECT     Date, CAST(Date AS bigint) AS DateNum, Title, Earnings
FROM         dbo.Analysis_001

Whenever I try to execute/modify this in the designer, I get "Cannot call methods in BIGINT" as a pop-up error. Out of frustration, I tried executing it using "CREATE VIEW" and it worked... Why?


回答1:


It's a bug:

  • either in Management Studio - "Cannot call methods on bigint" error (Wayback Machine link),

  • or .Net SqlClient Data Provider - Stupid problem with BigInt converting!!!.

Related question: SQL Server Cannot Call Methods on Date



来源:https://stackoverflow.com/questions/5557932/cannot-call-methods-on-bigint-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!