Code:
substring(cast((<YourNumber> % 1) as varchar(25)),3,25)
declare @d date declare @t time set @d = '1/1/2015' set @t = '9 PM' select cast(cast(@d as varchar(12)) + ' ' + cast(@t as varchar(15)) as datetime2) --select CONVERT(datetime, @d) + @t
INSERT INTO Avail
( [BranchID]
with x as ( select rowid = row_number() over (order by UseAColumnThatYouCanUseToSort), groupid = row_number() over (order by UseAColumnThatYouCanUseToSort)/20, AnyNumericColumn from YourTable
Leave a comment: