lang="en-US"> MSSQL –  Design1online.com, LLC

Tagged: MSSQL

0

MSSQL Tutorial: Delete All But 1 Duplicate Records

declare @id int, @total int /* SELECT COUNT OF POTENTIAL DUPLICATES */ select id, count(id) from [tablename] where [parameters] group by [column name] /* LOOP TO CLEAN UP THE DUPLICATES */ declare aff_crsr cursor...

0

SQL Tutorial: Select, Update & Delete Syntax

Select Statements General Syntax SELECT [column], [column], [column] FROM [tablename] WHERE [column] = [value] Select All Columns SELECT * FROM [tablename] Limit # of Records Returned – MSSQL SELECT TOP [number] * FROM [tablename]...

0

MSSQL Tutorial: Search code inside of stored proceedures

DECLARE @SEARCHSTRING VARCHAR(255), @notcontain Varchar(255) SELECT @SEARCHSTRING = ‘expiration_date =’, @notcontain = ” SELECT DISTINCT sysobjects.name AS [Object Name] , case when sysobjects.xtype = ‘P’ then ‘Stored Proc’ when sysobjects.xtype = ‘TF’ then ‘Function’...