This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fu_get_ISOWeek]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) | |
| DROP FUNCTION [dbo].[fu_get_ISOWeek] | |
| GO | |
| -- PRE: Valid datetime | |
| -- POST: ISO week number + '/' + year, NULL on NULL | |
| CREATE FUNCTION [dbo].[fu_get_ISOWeek](@dtDate as DATETIME) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fu_get_ISOWeek_SQL2005]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) | |
| DROP FUNCTION [dbo].[fu_get_ISOWeek_SQL2005] | |
| GO | |
| -- Return the ISO week of the year regardless of the DATEFIRST session SETting. | |
| CREATE FUNCTION [dbo].[fu_get_ISOWeek_SQL2005](@dtDate AS datetime) | |
| RETURNS nvarchar(7) WITH RETURNS NULL ON NULL INPUT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fu_RPT_RemoveChars]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) | |
| DROP FUNCTION [dbo].[fu_RPT_RemoveChars] | |
| GO | |
| CREATE FUNCTION [dbo].[fu_RPT_RemoveChars](@Input varchar(50)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[NUID]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) | |
| DROP FUNCTION [dbo].[NUID] | |
| GO | |
| CREATE FUNCTION [dbo].[NUID]() | |
| RETURNS uniqueidentifier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[udf_TitleCase]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) | |
| DROP FUNCTION [dbo].[udf_TitleCase] | |
| GO | |
| CREATE FUNCTION [dbo].[udf_TitleCase] (@InputString VARCHAR(4000) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fu_IsLeapYear]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) | |
| DROP FUNCTION [dbo].[fu_IsLeapYear] | |
| GO | |
| -- ======================================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DROP FUNCTION IF EXISTS fn_OverlappingDateRangesDays( | |
| __firstStart timestamp without time zone | |
| ,__firstEnd timestamp without time zone | |
| ,__secondStart timestamp without time zone | |
| ,__secondEnd timestamp without time zone); | |
| CREATE OR REPLACE FUNCTION fn_OverlappingDateRangesDays( | |
| __firstStart timestamp without time zone | |
| ,__firstEnd timestamp without time zone | |
| ,__secondStart timestamp without time zone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[V_DELDATA_CreateForeignKeyRelations]')) | |
| DROP VIEW [dbo].[V_DELDATA_CreateForeignKeyRelations] | |
| GO | |
| IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[V_DELDATA_Tables_All]')) | |
| DROP VIEW [dbo].[V_DELDATA_Tables_All] | |
| GO | |
| IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[V_DEV_FindMissingForeignKeys]')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Very interesting JavaScript behaviour: | |
| var mOptions = {abc:"def", ghi: "jkl"}; | |
| console.log(mOptions); | |
| var a = this.mOptions; | |
| console.log(a); | |
| var x = []; | |
| x.push(a); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'dbo._______aaaaaaa') AND type in (N'U')) | |
| DROP TABLE dbo._______aaaaaaa | |
| GO | |
| CREATE TABLE dbo._______aaaaaaa | |
| ( |