Visit: https://zonixsoft.com (our official Website) A solution to get comma separated list of values of single field of a database table You can use the following code to get the comma separated list of values of a single field of a table: DECLARE @commaSeparatedVal AS VARCHAR(4000) SELECT @commaSeparatedVal = ISNULL(@commaSeparatedVal +‘,’,”) + CONVERT(VARCHAR,[SKU]) […]
Author: Zonixsoft
DIFFERENCE and SOUNDEX in Transact-SQL
visit: https://zonixsoft.com (our official Website) DIFFERENCE(string1, string2) Returns the difference between two strings as a value between 0 and 4. This function uses the SOUNDEX algorithm to compare sounds, rather than characters. If the two strings match phonetically very well, the DIFFERENCE() function will return the value 4. If they don’t resemble each other even […]
Full Text Search in SQL Server 2005
Visit: https://zonixsoft.com (our Official Website) Definition : Full text search is the search functionality that enables a fast and easy way of searching text based data in SQL Server. Why Full Text Search? Let us assume that we have huge amounts of data in the database and we are having some search functionality involved in […]
MERGE Command in SQL Server
visit: https://zonixsoft.com (our official website) In SQL Server 2008, Microsoft introduces the MERGE functionality through the MERGE command. The MERGE command inserts rows that don’t exist and updates the rows that do exist. What MERGE Command works as, IF FOUND THEN UPDATE ELSE INSERT; Until now, this MERGE functionality could […]
CASE (Transact SQL)
Evaluates a list of conditions and returns one of multiple possible result expressions. CASE has two formats: · The simple CASE function compares an expression to a set of simple expressions to determine the result. · The searched CASE function evaluates a set of Boolean expressions to determine the result. Examples: A. Using a SELECT […]
CASE (Transact SQL)
Evaluates a list of conditions and returns one of multiple possible result expressions. CASE has two formats: · The simple CASE function compares an expression to a set of simple expressions to determine the result. · The searched CASE function evaluates a set of Boolean expressions to determine the result. Examples: A. Using a SELECT […]
Paging in SQL Server
Visit: https://zonixsoft.com (our official Website) Web Application Performance (Paging in Sql Server) As a Web developer, you know by now that using the default paging capabilities of ASP.NET Webcontrols like DataGrid and GridView cause the Performance issue when we have thousands and thousands of records in our database; because with every roundtrip to the data-server, […]
Paging in SQL Server
Visit: https://zonixsoft.com (our official Website) Web Application Performance (Paging in Sql Server) As a Web developer, you know by now that using the default paging capabilities of ASP.NET Webcontrols like DataGrid and GridView cause the Performance issue when we have thousands and thousands of records in our database; because with every roundtrip to the data-server, […]
Using TRY-CATCH to Rollback a Transaction in the Face of an Error
Visit : https://zonixsoft.com (our official website) Error Handing in Sql Server 2005. The release of Sql Server 2005 has provided us somany features over its predecessor. No doubt that more preference is given to the tasks performed by the administrator. But there are some new development features added to make your Sql Code more powerful […]
Passing lists to SQL server stored procedures
Visit : https://zonixsoft.com (our official wbsite) Article is about: The ability to pass “a list of values” from .Net as a parameter to a T-SQL based stored procedure. Scenarios: There are lots of scenarios where we need to pass a list of values to save in database. Here’s a couple of obvious ones: · INSERT […]