W wangyongqiang Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-24 #1 为何sql200自定义函数中不能使用getdate()函数
Z zhanggeye Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-24 #2 帮助中说得很清楚,用户定义函数中不允许使用以下内置函数: @@CONNECTIONS @@PACK_SENT GETDATE @@CPU_BUSY @@PACKET_ERRORS GetUTCDate @@IDLE @@TIMETICKS NEWID @@IO_BUSY @@TOTAL_ERRORS RAND @@MAX_CONNECTIONS @@TOTAL_READ TEXTPTR @@PACK_RECEIVED @@TOTAL_WRITE
帮助中说得很清楚,用户定义函数中不允许使用以下内置函数: @@CONNECTIONS @@PACK_SENT GETDATE @@CPU_BUSY @@PACKET_ERRORS GetUTCDate @@IDLE @@TIMETICKS NEWID @@IO_BUSY @@TOTAL_ERRORS RAND @@MAX_CONNECTIONS @@TOTAL_READ TEXTPTR @@PACK_RECEIVED @@TOTAL_WRITE
D dhl2001 Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-24 #3 CREATE FUNCTION abcde() RETURNS datetime AS begin declare @a datetime select @a=master.dbo.getdate() return(@a) end 调试通过
CREATE FUNCTION abcde() RETURNS datetime AS begin declare @a datetime select @a=master.dbo.getdate() return(@a) end 调试通过
W w12345678 Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-24 #5 由于getdate()返回啦一个不确定得值,所以不能在函数内使用
N Nizvoo Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-24 #6 强烈关注~~~~~~~~ 努力学习中~~~~~~~~~~~~~~~~~~
W w12345678 Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-24 #7 由于getdate()返回值不确定,所以不能用
W wangyongqiang Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-25 #8 有没有其它办法在自定义函数中得到当前的日期值?