Hi,
What does the line mean in the code below;
SELECT isnull(SUM(files.fileSize), 0) AS totalFileSize
ALTER FUNCTION [dbo].[fnc_statsTotalFileSizeByCompany]
(
@companyid int,
@fromDate datetime = '01 Jan 1900 00:00'
)
RETURNS bigint AS
BEGIN
declare @totalFileSize bigint
set @totalFileSize = (
SELECT isnull(SUM(files.fileSize), 0) AS totalFileSize
FROM users
INNER JOIN files ON users.userid = files.userid
INNER JOIN statsDownload ON files.fileid = statsDownload.fileid
WHERE users.companyid = @companyid AND downloaddate > @fromDate
)
return @totalFileSize
END
If, fileSize is declared as int, and the value apparently, goes beyond the range of int.. will this function need to be changed in anyway..
I have changed the filesize to Bigint in the table in the SQL database. But will this function also create any errors at runtime if no changes are done....
Sorry I dont have the DEV version to test on my machine..
Thanks