-
Some SQL script i used to detect/remove double entries
DECLARE @MinID int; DECLARE @MaxID int; DECLARE @ID int; SELECT @MinID = MIN(ProductID) from Product; SELECT @MaxID = MAX(ProductID) from Product; SELECT @ID = ProductID from Product WHERE FK_ProductTypeID=’4′; SELECT TOP 1 Title FROM Product WHERE ProductID < @ID OR @ID=@MinID ORDER BY ProductID DESC; SELECT TOP 1 Title FROM Products WHERE ProductID > @ID [...]
-
SQL Queries to find double entries
3 possible SQL Queries to retrieve double entries in a table
-
T-SQL Split function
T-SQL Split function
-
Dynamic Stored Procedure with Count, Filter & Paging
Dynamic Stored Procedure with Count, Filter & Paging
-
SQL Query to drop all FK constraints
SQL Query to drop all FK constraints
-
Use a non-recursive User Defined Function in SQL Server to get all descendants for an element
Use a non-recursive User Defined Function in SQL Server to get all descendants for an element
-
Get the inserted ID with Scope_Identity()
Get the inserted ID with Scope_Identity()
-
Get info about columns in a database with SqlDataAdapter.FillSchema
Get info about columns in a database with SqlDataAdapter.FillSchema