SQL Server – Calculating elapsed time from DATETIME
Elapsed time can be calculated from DATETIME field by extracting number of hours/minutes and seconds. You can use below query...
2013-12-23
95 reads
Elapsed time can be calculated from DATETIME field by extracting number of hours/minutes and seconds. You can use below query...
2013-12-23
95 reads
Before an existing database can be restored, there should be connections using the database in question. If the database is...
2013-11-25
1,443 reads
Before an existing database can be restored, there should be connections using the database in question. If the database is...
2013-11-25
247 reads
Before an existing database can be restored, there should be connections using the database in question. If the database is...
2013-11-25
86 reads
ORDER BY clause can be used to sort the results returned by SELECT statement in SQL Server. It orders the...
2013-11-18
4,320 reads
ORDER BY clause can be used to sort the results returned by SELECT statement in SQL Server. It orders the...
2013-11-18
418 reads
ORDER BY clause can be used to sort the results returned by SELECT statement in SQL Server. It orders the...
2013-11-18
143 reads
Earlier on my blog I posted on How to get SQL Server Service Account using T-SQL. That works on a...
2013-08-26
1,263 reads
Earlier on my blog I posted on How to get SQL Server Service Account using T-SQL. That works on a...
2013-08-26
224 reads
Earlier on my blog I posted on How to get SQL Server Service Account using T-SQL. That works on a...
2013-08-26
115 reads
By Brian Kelley
If you're not having success in convincing your organization to send you to this...
By Rohit Garg
When deploying SQL Server in enterprise environments, choosing the right service account model is...
By Brian Kelley
There are always bad actors who will seek to get access to and, likely,...
Comments posted to this topic are about the item Determining the Updated Columns
Comments posted to this topic are about the item Carrots and Sticks
I am trying to create and Update query based on a like join. Is...
I am creating a trigger in SQL Server 2022 and want to detect a change in a table. Here is my table DDL:
CREATE TABLE CustomerLarge ( CustomerID INT NOT NULL IDENTITY(1,1) CONSTRAINT CustomerLargePK PRIMARY KEY CLUSTERED , CustomerName VARCHAR(20) , CustomerContactFirstName VARCHAR(40) , CustomerContactLastName VARCHAR(40) , Address VARCHAR(20) , Address2 VARCHAR(20) , City VARCHAR(20) , CountryCode CHAR(3) , Postal VARCHAR(20) , creditlimit INT , discount numeric(4,2) , lastorderdate DATETIME , lastorderamount NUMERIC(10,2) , lastordercontact VARCHAR(20) , created DATETIME , modified DATETIME , modifiedby VARCHAR(20) , statusid INT , active BIT , customersize INT , primarysalesid INT) GOIf I want to detect that the creditlimit was updated, what IF statements should I use? See possible answers