Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- ============================================= CREATE PROCEDURE TimeDifferenceSecs -- Add the parameters for the stored procedure here @batchnumber int = 99, @vessel varchar(50) = "??", @firstdate as datetime, @lastdate as datetime, @difference as datetime AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here set @firstdate = SELECT top 1 datetimecol from Test_01.Table_1 where batchcol = @batchnumber order by datetimecol ASC set @lastdate = SELECT top 1 datetimecol from Test_01.Table_1 where batchcol = @batchnumber order by datetimecol DES set @difference = Datediff("s",@firstdate,@lastdate) END GO
Join the community of 500,000 technology professionals and ask your questions.