Cursor- Sql Server

Temp Table in Sql Server

October 2, 2021 admin 1

How to Create Temp Table in Sql Server   Check, Drop, Re-Created and Insert in Temp Table IF OBJECT_ID(‘tempdb..#CONTACTMASTER’) IS NOT NULL    DROP TABLE dbo.#CONTACTMASTER; […]

Cursor- Sql Server

Cursors In SQL Server

August 10, 2021 admin 0

A Sql Server cursor is an object that enables you to loop over the bunch of a result set/tuples. It gave access to each individual […]

Cursor- Sql Server

List Stored Procedure In Sql Server

January 3, 2021 admin 0

1. list of all Stored Procedure Modified in last N Days ———————————————————————— SELECT name FROM sys.objects WHERE type = ”P” AND DATEDIFF(D,modify_date, GETDATE()) < 10 […]

Cursor- Sql Server

Date Calculation in Sql Server

November 20, 2020 admin 0

Date Calculation in Sql Server Compute Total Duration in Seconds –Total number of seconds between two dates select *, DateDiff(second, StartDate, EndDate) as TotalSeconds  from Bookings ID          StartDate                    EndDate                    TotalSeconds 1           2020–01–01 06:34:12.000      2020–01–01 12:45:34.000    22282 2           2020–01–02 09:23:08.000      2020–01–02 17:05:37.000    27749 3           2020–01–03 16:34:12.000      2020–01–03 16:55:18.000    1266 4           2020–01–04 11:02:00.000      2020–01–04 14:53:21.000    13881 5           2020–01–05 07:52:55.000      2020–01–05 09:08:48.000    4553 6           2020–01–06 19:59:11.000      2020–01–07 01:23:11.000    19440 7           2020–01–07 03:12:23.000      2020–01–07 20:02:25.000    60602     Convert Above Duration […]