Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE #Table1(Name varchar(10), Date date, Type varchar(10));
- INSERT INTO #TABLE1
- VALUES
- ('aa', '2018-09-10', 'Client'),
- ('bb', '2018-10-12', 'Client'),
- ('cc', '2018-10-16', 'Client'),
- ('dd', '2018-11-12', 'Client'),
- ('ee', '2018-10-15', 'Client'),
- ('ff', '2018-11-17', 'Client'),
- ('gg', '2018-12-12', 'Client'),
- ('tt', '2018-11-11', 'Server'),
- ('kk', '2018-12-15', 'Server');
- CREATE TABLE #Table2(ID INT, Type varchar(10), DateCreated date);
- INSERT INTO #Table2
- VALUES
- (1,'Client', '2018-11-25'),
- (2,'Client', '2018-10-25'),
- (3,'Client', '2018-11-17'),
- (4,'Client', '2018-09-25'),
- (5,'Client', '2018-11-10'),
- (6,'Client', '2018-12-05'),
- (7,'Client', '2018-11-02'),
- (8,'Server', '2018-11-19'),
- (9,'Server', '2018-12-10');
- ID Type Date Created Name
- 1 Client 2018-11-25 ff
- 2 Client 2018-10-25 cc
- 3 Client 2018-11-17 ff
- 4 Client 2018-09-25 aa
- 5 Client 2018-11-10 dd
- 6 Client 2018-12-05 ff
- 7 Client 2018-11-02 cc
- 8 Server 2018-11-19 tt
- 9 Server 2018-12-10 tt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement