Map of Switzerland with TopoJSON and map data from Swiss Maps. Cantons and municipalities are combined in a single TopoJSON file.
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_GroupMembership]')) | |
| DROP VIEW [dbo].[V_GroupMembership] | |
| GO | |
| CREATE VIEW dbo.V_GroupMembership | |
| AS |
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
| SELECT * FROM some_table WHERE id_column = ANY(@id_list) | |
| -- where @id_list is bound to an int[] parameter by way of | |
| SELECT * FROM some_table WHERE id_column = ANY(@id_list); | |
| -- Code: | |
| command.Parameters.Add("@id_list", NpgsqlDbType.Array | NpgsqlDbType.Integer).Value = my_id_list; | |
| where command is a NpgsqlCommand |
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
| /* | |
| CREATE TABLE T_PermissionEntity | |
| ( | |
| Id bigint NOT NULL, | |
| Name national character varying(255) NULL, | |
| IsGroup bit NULL, | |
| IsUser bit NULL, | |
| CONSTRAINT PK_T_PermissionEntity PRIMARY KEY (Id) | |
| ); |
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
| SELECT | |
| --table_name | |
| --,column_name, | |
| --,' SELECT ''' + REPLACE(table_name, '''', '''''') + ''' AS tableName, * FROM ' + QUOTENAME(table_name) + ' WHERE ' + QUOTENAME(column_name) + ' > ' + REPLACE(QUOTENAME(column_name), 'Von', 'Bis') + '; ' AS cmd | |
| --, | |
| ' | |
| IF EXISTS (SELECT * FROM sys.check_constraints WHERE object_id = OBJECT_ID(N''dbo.CHK_' + table_name + '_' + column_name + '_LESSOREQUAL_' + REPLACE(column_name, 'Von', 'Bis') + ''') AND parent_object_id = OBJECT_ID(N''dbo.' + table_name + ''')) |
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_DEV_InsertDataDependency')) | |
| DROP VIEW dbo.V_DEV_InsertDataDependency | |
| GO | |
| CREATE VIEW dbo.V_DEV_InsertDataDependency | |
| AS |
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
| SELECT | |
| table_schema | |
| ,table_name | |
| FROM INFORMATION_SCHEMA.TABLES | |
| WHERE table_type = 'BASE TABLE' | |
| AND table_name NOT IN ('dtproperties', 'sysdiagrams') | |
| AND table_name LIKE 'T\_%' ESCAPE '\' | |
| AND table_name NOT LIKE 'T\_BO\_%' ESCAPE '\' |
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
| CREATE TRIGGER dbo.TG_INSTEAD_DEL_T_Benutzer_Benutzergruppen | |
| ON dbo.T_Benutzer_Benutzergruppen | |
| INSTEAD OF DELETE | |
| AS | |
| BEGIN | |
| RETURN | |
| END | |
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.fn_GetFlagDescription') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) | |
| DROP FUNCTION dbo.fn_GetFlagDescription | |
| GO | |
| CREATE FUNCTION dbo.fn_GetFlagDescription(@flag int) | |
| RETURNS varchar(400) | |
| AS |
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
| Public Shared Function GetFlagDescription(flag As Integer) As String | |
| Dim vcRet As String = Nothing | |
| ' Flag: | |
| ' SUM | |
| ' ( | |
| ' CASE | |
| ' WHEN PRIVILEGE_TYPE = 'SELECT' THEN 1 | |
| ' WHEN PRIVILEGE_TYPE = 'INSERT' THEN 2 |