How to catch specific MS-SQL SQLExceptions in C# and VB.NET
To catch specific SQLExceptions using Microsoft.NET and Microsoft Sequel Server you can use the snippet below. You also need to look for the specific error numbers/codes you want to catch.…
All the Code Snippets and Samples you need
To catch specific SQLExceptions using Microsoft.NET and Microsoft Sequel Server you can use the snippet below. You also need to look for the specific error numbers/codes you want to catch.…
To get the current Database and Log Filesize using MSSQL you can use the snippet below. Tested using SQL Server 2012. Sample MSSQL Sample Output
To drop Primary Key of a Table using MSSQL you can use the snippet below. http://youtu.be/0kfyw8M83bA Sample MSSQL
To search stored procedures using MS-SQL you can use the snippet below. https://www.youtube.com/watch?v=qbHT5HYyTKg Sample MSSQL
In MSSQL IF ELSE is not supported inside the SQL-Query. For a similiar behaviour you should use CASE WHEN keyword. Sample Query
To list all Databases in MSSQL you can use the following snippet. Sample MSSQL SQL Server Version newer than MS SQL 2000 also support these StoredProcedures. or
To TRIM a string in MSSQL you can use the following Userdefinedfunction Snippet. Sample MSSQL
To check if a column exists in MSSQL you can use the following snippet. Sample MSSQL
To select date from datetime in MSSQL you can use the following snippet. Sample MSSQL The 104 is for tt.mm.jjjj, a list of formats can be found at the MSDN…
To learn how to use the Space() function in MSSQL you can take a look at the following snippet. Let’s say you have a table (tblTest) like this: ID…