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

Generate A Date From Day, Month & Year In SQL Server

Jun 26, 2019 by Beaulin Twinkle
Generate A Date From Day, Month & Year

Here is a simple method to generate a date from integer format of day, month and year in SQL Server.

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

RAND() vs NEWID() In SQL Server

Jun 26, 2019 by Beaulin Twinkle
Rand() vs NewId()

Here we will compare the builtin SQL Server functions RAND() vs NEWID() and understand the major differences between them.

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

Generating Unique Random Number For Each Row in Select Statement

Jun 21, 2019 by Beaulin Twinkle
Unique Random Numbers For Each Row in Select Statement

Here is a simple trick for generating unique random number for each row in select statement in SQL Server. Let’s see how it works.

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

How To Generate Random Numbers In SQL Server?

May 14, 2021Jun 21, 2019 by Beaulin Twinkle
Generate Random Numbers In SQL Server

Generating random numbers is very simple in SQL Server. We can use the built-in function RAND() to generate random number. Here are some examples.

Categories SQL Server Tags SQL Tips, Transact-SQL (T-SQL) 4 Comments

Getting The List Of Column Names Of A Table In SQL Server

Jun 20, 2019 by Beaulin Twinkle
Column Names using SP_COLUMNS

There are several ways to get the the list of column names of a table on a specific SQL Server database. I will go through these methods.

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

Getting Day Of Year In SQL Server

Jun 20, 2019 by Beaulin Twinkle
Get Day Of Year In SQL Server

There is a couple of straightforward ways to get day of year for a given date in SQL Server using DATENAME or DATEPART built-in function. Let’s see how to use them

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

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 Find Number Of Weeks In A Month in SQL Server?

Jun 20, 2019 by Beaulin Twinkle
Find Number Of Weeks In A Month in SQL Server

Here are couple methods to find the number of weeks in a month including the partial weeks considering different start day of week.

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

How To Find Leap Year In SQL Server?

Jun 19, 2019 by Beaulin Twinkle
Find leap year in SQL Server

We have to use our own logic to find whether the given year is leap or not. Here I have gone through couple of methods to find the the leap year in SQL Server.

Categories SQL Server Tags 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

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

Jun 13, 2019 by Beaulin Twinkle
Get The Week Number Of Year

Here is the simple tip to get the week number of the year In SQL Server using an in-built function.

Categories SQL Server Tags SQL, SQL Server 2017, SQL Tips, Transact-SQL (T-SQL) 1 Comment

How To Get Name of Month In SQL Server?

Jun 12, 2019 by Beaulin Twinkle
Get the name of month in SQL Server

Quick tip for getting the name of month In SQL Server for a specific date or current date.

Categories SQL Server Tags SQL, SQL Server 2017, SQL Tips Leave a comment

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

A Time Synchronized Hybrid VANET To Improve Road Safety

Feb 27, 2019 by Dahlia Sam
A Time Synchronized Hybrid VANET To Improve Road Safety

Vehicle control system using the Hybrid VANET is a very reliable and efficient solution than any of the existing methods to prevent road accidents.

Categories Networks And Distributed Systems Tags Network Simulator, VANET Leave a comment

Collecting Poor Performing Queries And Storing Them For Analysis (Using Extended Events)

Dec 20, 2018 by Beaulin Twinkle
Using Extended Events Demo 01

Simple step by step illustration for collecting poor performing queries or batches and store them for further analysis in SQL Server using Extended Events.

Categories SQL Server Tags Extended Events, Performance, SQL, Transact-SQL (T-SQL) Leave a comment

Collect Poor Performing Queries And Store Them (Using Profiler)

Dec 20, 2018Dec 16, 2018 by Beaulin Twinkle
Collect Poor Performing Queries

How to collect poor performing queries or batches and store them in a database table for further analysis in SQL Server using MSSQL Profiler?

Categories SQL Server Tags Performance, SQL, SQL Server Profiler, Transact-SQL (T-SQL) Leave a comment

Is It Good To Use VARCHAR(MAX) Instead Of VARCHAR(N)?

Dec 6, 2018 by Beaulin Twinkle
VARCHAR(MAX) vs VARCHAR(N)

Is it a good practice to use VARCHAR(MAX) instead of VARCHAR(N)? We will see the answer and the reason for it in this article.

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

VARCHAR(MAX) vs VARCHAR(N)

Dec 6, 2018Nov 30, 2018 by Beaulin Twinkle
VARCHAR(MAX) vs VARCHAR(N)

VARCHAR(MAX) vs VARCHAR(N). Comparing the differences, advantages and disadvantages between VARCHAR(MAX) and VARCHAR(N).

Categories SQL Server Tags SQL, SQL Tips, Transact-SQL (T-SQL) Leave a comment
Older posts
Newer posts
← Previous Page1 … Page10 Page11 Page12 … Page23 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

  • Where is SQL Server Configuration Manager?
  • Formatting SQL statements in SSMS
  • How to store images in SQL Server?
  • Error: 'SqlConnection' could not be found in the namespace (Solved)
  • How to exit from single-user mode in SQL Server database?
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.