At the moment I have the following code that converts the number of seconds into hh:mm:ss.
CONVERT(varchar(10), DATEADD(ss, DurationSeconds, '00:00:00'), 108)
Messy but it works!
If I converted that to the following which is neater but then run it for thousands of rows will I see a performance hit?
The code I would use to create my function could be like so.
CREATE FUNCTION ConvertSecondsToHMS ( @Seconds int ) RETURNS varchar(10) AS BEGIN RETURN CONVERT(varchar(10), DATEADD(ss, @Seconds, '00:00:00'), 108) END