In terms of distance, a nautical mile is equal to 1,852 kilometers. People commonly use it to measure distances at sea or in the air. The use of NM, the internationally agreed-upon measure of one nautical mile, which is exactly 1.852 meters, remains in place today. Calculation: Consider the equator as a circle, it […]
Month: July 2024
How to Find Day Name From Date in SQL Server
There are two methods to find a day name from a date in SQL Server: DATENAME() Function FORMAT() Function Using DATENAME DECLARE @Date DATE = ‘2024-07-27’; SELECT @Date As [TDate], DATENAME(WEEKDAY, @Date) AS [Day_Name]; Using FORMAT DECLARE @Date DATE = ‘2024-07-27’; SELECT @Date As [TDate], FORMAT(@Date, ‘dddd’) AS [Day_Name]
How to make pagination in MS SQL Server
In MS SQL Server, we can achieve the pagination functionality by using OFFSET and FETCH clauses with ORDER BY in a SELECT statement. OFFSET: Represents the number of rows to be skipped from the result set. It should be 0 or greater than 0. FETCH: Represents the number of rows to be displayed in the result. Notes: ORDER BY is mandatory for the use OFFSET […]