Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!
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
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Where on a calculated field||1||32|
|reccommendations for a free msft sql query manager?||4||45|
|query error in former passthrough query||2||33|
|Update the value of table B with value of table A tables inner join||6||78|