intellectually constipated

patrick gallucci's technology brain drain

Browse by Tags

Tagged Content List
  • Blog Post: SQL Server Function to merge a date with a time

    I use this when I need to join two fields. One has a date, the other has a time.   IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N '[util].[uf_MergeDate2Time]' ) AND type in (N 'FN' , N 'IF' , N 'TF' , N 'FS' , N 'FT' )) DROP FUNCTION [util].[uf_MergeDate2Time] GO ...
  • Blog Post: SQL Server Function to get the Hour of the Year

    This function returns an integer of the hour of the year passed as a variable. IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N '[util].[uf_GetHourOfYear]' ) AND type IN (N 'FN' , N 'IF' , N 'TF' , N 'FS' , N 'FT' )) DROP FUNCTION [util].[uf_GetHourOfYear] GO CREATE...
  • Blog Post: SQL Server Function to get the Hour of the Month

    This function returns an integer of the hour of the month passed as a variable. IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N '[util].[uf_GetHourOfMonth]' ) AND type IN (N 'FN' , N 'IF' , N 'TF' , N 'FS' , N 'FT' )) DROP FUNCTION [util].[uf_GetHourOfMonth] GO ...
Page 1 of 1 (3 items)