Skip to content
  • Facebook
  • GitHub
  • YouTube
  • Pinterest
My Tec Bits
  • Home
  • Microsoft
    • .Net
      • ASP.NET
      • MVC
      • Visual Studio
    • IIS
    • SQL Server
      • SQL Server 2019
      • SQL Server 2017
      • SQL Server 2016
      • SQL Server 2014
      • SQL Server 2012
      • SQL Server 2008
    • Windows OS
  • Web Development
    • Java Script
    • Jquery
    • Python
    • Bootstrap
    • Zurb Foundation
    • Web Security
  • More
    • macOS
    • Reviews
  • Online Tools
    • Fitness Calculators
    • Encoders & Decoders
    • Cryptography
    • Unit Converters
    • Math. Calculators
    • Date & Time Calculators
    • Finance Calculators

SQL Server 2012

How to format a number with commas in SQL Server?

Oct 18, 2023 by Beaulin Twinkle
Format a number with commas using FORMAT function

There are couple of different ways to format a number with commas in SQL Server. Let see them in detail.

Categories SQL Server Tags SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server 2019, SQL Server 2022, SQL Tips, Transact-SQL (T-SQL) Leave a comment

Advantages and disadvantages of cursors in SQL Server

Jul 15, 2023 by Beaulin Twinkle
Advantages and disadvantages of cursors in SQL Server

While cursors can be useful in certain scenarios, they also come with both advantages and disadvantages. Let’s explore the advantages and disadvantages of cursors.

Categories SQL Server Tags SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server 2019, Transact-SQL (T-SQL) Leave a comment

IIF vs CHOOSE in SQL Server

Mar 2, 2023 by Beaulin Twinkle
IIF vs CHOOSE in SQL Server

IIF and CHOOSE are two logical functions in SQL Server used for different purposes. Here we will see the competition of IIF vs CHOOSE.

Categories SQL Server Tags SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server 2019, Transact-SQL (T-SQL) Leave a comment

How to calculate median in SQL Server?

Jul 14, 2022Feb 20, 2022 by Beaulin Twinkle
Calculate Median In SQL Server

Here is one another simple way to calculate median using the PERCENTILE_CONT function introduced in SQL Server 2012.

Categories SQL Server Tags SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server 2019, Transact-SQL (T-SQL) Leave a comment

How To Drop Temporary Table If Exists In SQL Server?

Jun 28, 2019 by Beaulin Twinkle
Drop Temporary Table Only If Exists

Here is a simple tip on how to drop a temporary or temp table if it exists using the DIY in 2016 or higher versions of SQL Server.

Categories SQL Server Tags SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Tips, Transact-SQL (T-SQL) Leave a comment

Convert DateTime To YYYY-MM-DD Format In SQL Server

Dec 20, 2019Jun 27, 2019 by Beaulin Twinkle
Convert DateTime To YYYY-MM-DD Format

Here is a simple tip to convert the datetime value to a specific formatted date like YYYY-MM-DD in SQL Server 2012 and higher.

Categories SQL Server Tags SQL Server 2012, SQL Server 2017, SQL Tips, Transact-SQL (T-SQL) 3 Comments

How To Get Only The Date Part Of GetDate() In SQL Server?

Jun 20, 2019 by Beaulin Twinkle
Get Only The Date Part Of GetDate()

Here is the simple technique to get only the date part of GetDate() in SQL Server.

Categories SQL Server Tags SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Tips, Transact-SQL (T-SQL) Leave a comment

How To Get The Last Day Of The Month In SQL Server?

Jun 14, 2019 by Beaulin Twinkle
Get The Last Day Of The Month

Here is the simple straightforward way to find the last day of the month in SQL Server using the built-in date function EOMONTH.

Categories SQL Server Tags SQL Server 2012, SQL Tips, Transact-SQL (T-SQL) Leave a comment

How To Find The First Day Of The Month In SQL Server?

Jun 14, 2019Jun 14, 2019 by Beaulin Twinkle
Find The First Day Of The Month

Here is a simple script to find the first day of the month in SQL Server without using varchar conversion. This method returns the result in datetime format.

Categories SQL Server Tags SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Tips, Transact-SQL (T-SQL) Leave a comment

How To Get The Week Number Of Month In SQL Server?

Jun 14, 2019 by Beaulin Twinkle
Get The Week Number Of Month

Here is a simple SQL Server tip on getting the week number of month using DATEPART, DATEADD and EOMONTH functions.

Categories SQL Server Tags SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Tips, Transact-SQL (T-SQL) 2 Comments

IIF vs CASE in SQL Server

Jun 7, 2019 by Beaulin Twinkle
IIF vs CASE

Let us see the major differences between IIF vs CASE. IIF is a logical function and CASE is a language expression.

Categories SQL Server Tags SQL, SQL Server 2008, SQL Server 2012, SQL Server 2017, Transact-SQL (T-SQL) 2 Comments

Trace Errors And Exceptions Using Profiler

Oct 24, 2018 by Beaulin Twinkle
Trace Errors And Exceptions Using Profiler

How to trace errors and exceptions using profiler in SQL Server? Using SQL Server profiler is the easiest way to capture the errors and exceptions occurring in the SQL Server database.

Categories SQL Server Tags SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server Profiler, SQL Tips Leave a comment

Launching SQL Server Profiler

Dec 16, 2018Oct 19, 2018 by Beaulin Twinkle
Launching SQL Server Profiler

How to launch SQL Server profiler in windows workstation? Here is the easiest option and step by step instruction for launching SQL Server profiler.

Categories SQL Server Tags SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server Profiler, Windows 10 Leave a comment

Saving Profiler Trace Results To A Table

Oct 17, 2018 by Beaulin Twinkle
Saving Profiler Trace Results To A Table

How to save the collected profiler trace to a table in SQL Server? Here are the steps for saving profiler trace results to a table for further analysis.

Categories SQL Server Tags SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server Profiler, SQL Tips Leave a comment

Monitoring Specific Table Using SQL Profiler

Oct 6, 2018 by Beaulin Twinkle
Monitoring Specific Table Using SQL Profiler

Monitoring specific table using profiler in SQL Server? Here is a simple trick to capture and monitor all the queries and stored procedures executed against a table.

Categories SQL Server Tags SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server Profiler, SQL Tips Leave a comment

Using Filters In Profiler Trace

Sep 13, 2018 by Beaulin Twinkle
Capturing Only Stored Procedures Using Profiler

What are filters in SQL Server profiler trace and how to use them to capture various events? Here I have explained using filters in profiler trace and when to use them.

Categories SQL Server Tags SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server Profiler Leave a comment

Capturing Stored Procedure’s Parameter Values

May 30, 2019Sep 13, 2018 by Beaulin Twinkle
Capturing Stored Procedure's Parameter Values

How to capture a stored procedure and the parameter values passed to it every time it is executed? Here is a method for capturing stored procedure’s parameter values using SQL Server Profiler.

Categories SQL Server Tags SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server Profiler, SQL Tips Leave a comment

Capturing Only The Stored Procedures Using Profiler

Sep 12, 2018Sep 6, 2018 by Beaulin Twinkle
Capturing Only Stored Procedures Using Profiler

How to capture only the SQL Server stored procedures using profiler? Using SQL Server profiler trace to trap all the stored procedures executed against a database.

Categories SQL Server Tags SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server Profiler, SQL Tips Leave a comment

Debugging Queries Inside Stored Procedure Using Profiler

Oct 19, 2018Sep 5, 2018 by Beaulin Twinkle
SQL Server Profiler Trace properties Events

How to use SQL Server profiler to capture and debug the queries executed from inside the stored Procedure? Here is the step by step instruction for debugging queries inside stored procedure using profiler.

Categories SQL Server Tags SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server Profiler, SQL Tips 3 Comments

How To Find Index Fragmentation

Aug 29, 2018Aug 25, 2018 by Beaulin Twinkle
Find Index Fragmentation

Here is the T-SQL query to find index fragmentation in SQL Server database. This query will list all the indexes in the database and the the fragmentation level in percent.

Categories SQL Server Tags SQL, SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, Transact-SQL (T-SQL) Leave a comment
Older posts
Page1 Page2 … Page4 Next →

Article Categories

  • Android (2)
  • Apple (22)
    • macOS (22)
  • Internet & Web Dev. (152)
    • DNN (4)
    • Java Script (10)
    • Jquery (8)
    • PHP (7)
    • Python (83)
    • Twitter Bootstrap (25)
    • Web Security (11)
    • Zurb Foundation (6)
  • Linux (4)
  • Microsoft (318)
    • .Net (69)
    • IIS (10)
    • Internet Explorer (3)
    • Office (2)
    • SQL Server (225)
    • Windows (24)
  • Networks And Distributed Systems (2)
  • Oracle (7)
    • Java (2)
    • Oracle Database (5)
  • Others (6)
  • Reviews (10)

Recent Articles

  • Installing .NET SDK in Linux Mint and debugging C# code using VS Code Jun 21, 2024
  • Generating random number in C#  Jun 6, 2024
  • How to calculate running total in SQL Server? Apr 27, 2024
  • How to import XML data into SQL Server using SELECT query? Apr 10, 2024
  • How to prevent VS Code from replacing an already opened preview tab with a subsequently opened one? Mar 13, 2024
  • Separating letters and numbers from strings in SQL Server Mar 6, 2024
  • How to call or run another application from python code? Feb 15, 2024
  • How to store images in SQL Server? Jan 17, 2024
  • Error: A table that has FILESTREAM columns must have a nonnull unique column with the ROWGUIDCOL property. Jan 8, 2024
  • Fix for Error: “FILESTREAM feature is disabled” while adding FILESTREAM Jan 4, 2024

Subscribe MyTecBits.com

Online Tools

  • Fitness Calculators
  • Encoders & Decoders
  • Cryptography
  • Unit Converters
  • Math. Calculators
  • Date & Time Calculators
  • Finance Calculators

Popular Articles

  • Joining Tables from Databases on Different SQL Servers
  • RDP Error: The identity of the remote computer cannot be verified
  • Where is SQL Server Configuration Manager?
  • Auto Generate INSERT Statements for a Table in SQL Server
  • How to compare contents of two files in Visual Studio Code?
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. Learn more...
  • Home
  • About Us
  • Contact Us
  • Site Map
  • Terms Of Use
  • Privacy Policy
© 2012 - 2025 My Tec Bits. All Rights Reserved.