How To Get The Last Update Of Any Table In MSSQL?…
SQL Query
Get Distinct Maximum Date
Get Distinct Maximum Date Display the latest order of each customers. SELECT A.CustomerID, OrderDate, EmployeeID, ShipperID FROM Orders AS A INNER JOIN(SELECT CustomerID, MAX(OrderDate) AS MaxOrderDate FROM Orders GROUP BY CustomerID) AS B…
Calculate Total Hour and Minute in SQL
SELECT ((DATEDIFF(minute, ‘2013-06-30 08:30:00.0000000’, ‘2013-06-30 10:45:00.0000000’))/60) AS TotalHour, ((DATEDIFF(minute, ‘2013-06-30 08:30:00.0000000’, ‘2013-07-30 10:45:00.0000000’))%60) AS TotalMinute The result of the above query is: TotalHour TotalMinute 2 15…
Multiple JOIN in MS Access
When you query a multiple join in MSSQL you use this following query:SELECT a.columna, b.columnb, c.columncFROM tablea AS a LEFT JOIN tableb AS b ON a.id = b.id LEFT JOIN tablec AS c…