KGJ-Dev - Friday, January 19, 2018 9:16 AM
You should find it easy enough from here:
SELECT bom = DATEADD(day,1,DATEADD(month,-1,x.eom)), x.eom
FROM (VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),
(13),(14),(15),(16),(17),(18),(19),(20),(21),(22),(23),(24)) d (n)
CROSS APPLY (SELECT eom = DATEADD(MONTH,-n,EOMONTH(GETDATE()))) x
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden