Like hourly report, the following example guide you to retrieve a daily report. As discussed earlier, If the date column is SMALLDATETIME or DATETIME, we
Author: SHAFI SHAIK
SQL Server – Hourly Report – Group by Hour
Often it is important to know how many inserts occur per hour in a transaction table OR how many payments are made per hour OR
SQL Server – INSERT Statements
INSERT can be used in different ways. The following examples will guide you the method of row constructions using INSERT. CREATE TABLE Test1( Column1 INT,
SQL Server – Foreign Key Relationships
To establish a connection between two or more tables, foreign key constraint will be used. One table’s primary key column can be referred to another
SQL Server – GETDATE(), CURRENT_TIMESTAMP in DEFAULT statements
Most of the transactional tables generally do require to have a column with DEFAULT value as current date time to identify when the transaction had
SQL Server – CASE Function- Examples
This article talks about an equivalent of Oracle SQL’s DECODE function in SQL Server. There is no such function in SQL Server but through CASE