Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. CREATE TABLE #Table1(Name varchar(10), Date date, Type varchar(10));
  2. INSERT INTO #TABLE1
  3. VALUES
  4. ('aa', '2018-09-10', 'Client'),
  5. ('bb', '2018-10-12', 'Client'),
  6. ('cc', '2018-10-16', 'Client'),
  7. ('dd', '2018-11-12', 'Client'),
  8. ('ee', '2018-10-15', 'Client'),
  9. ('ff', '2018-11-17', 'Client'),
  10. ('gg', '2018-12-12', 'Client'),
  11. ('tt', '2018-11-11', 'Server'),
  12. ('kk', '2018-12-15', 'Server');
  13.  
  14. CREATE TABLE #Table2(ID INT, Type varchar(10), DateCreated date);
  15. INSERT INTO #Table2
  16. VALUES
  17. (1,'Client', '2018-11-25'),
  18. (2,'Client', '2018-10-25'),
  19. (3,'Client', '2018-11-17'),
  20. (4,'Client', '2018-09-25'),
  21. (5,'Client', '2018-11-10'),
  22. (6,'Client', '2018-12-05'),
  23. (7,'Client', '2018-11-02'),
  24. (8,'Server', '2018-11-19'),
  25. (9,'Server', '2018-12-10');
  26.  
  27. ID Type Date Created Name
  28. 1 Client 2018-11-25 ff
  29. 2 Client 2018-10-25 cc
  30. 3 Client 2018-11-17 ff
  31. 4 Client 2018-09-25 aa
  32. 5 Client 2018-11-10 dd
  33. 6 Client 2018-12-05 ff
  34. 7 Client 2018-11-02 cc
  35. 8 Server 2018-11-19 tt
  36. 9 Server 2018-12-10 tt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement