Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
new problem SQL
CREATE TABLE dbo.[Server] (ID INT IDENTITY(1,1) NOT NULL ,ServerName VARCHAR(50) NOT NULL ,DayOnline DATE NOT NULL); INSERT INTO dbo.[Server] ( [ServerName] ,DayOnline ) VALUES ('MyServer','2018-05-01') ,('MyServer','2018-05-02') ,('MyServer','2018-05-03') ,('MyServer','2018-05-04') ,('MyServer','2018-05-05') ,('MyServer','2018-05-07') ,('MyServer','2018-05-08') ,('MyServer','2018-05-09') ,('MyServer','2018-05-15') ,('MyServer','2018-05-16') ,('MyServer','2018-05-17') ,('MyServer','2018-05-19') ,('MyServer','2018-05-20'); select * from server /* expected output Online/Offline Days Online 5 days offline 1 day Online 3 days ... */ /* another comment */
run
|
edit
|
history
|
help
0
sqript for print !00 numbers with out loop
SQL Directives Order of Execution
SQL Directives Order of Execution
forming date as nvarchar
FIGURA5.1
BC3TOSQL
second Query
dbms
test
Performance test - select vs while - Get all days between two dates.