Q&A about the site for software engineers working on automated testing, continuous delivery, service integration and monitoring, and building SDLC infrastructure
/*SELECT p.Id PostId, OwnerUserId, OwnerDisplayName, LastEditorUserId, LastEditorDisplayName, LastEditDate, LastActivityDate FROM POSTS p WHERE 1=1 and Id < 1000*/ /*SELECT --u.* u.id userID, p.Id postId, p.Title, p.ParentId, p.OwnerUserId FROM USERS u, POSTS p WHERE --u.id = p.OwnerUserId u.id = p.ParentId and u.id < 1000 ORDER BY u.DisplayName ASC , p.CreationDate DESC */ /* SELECT u.id userID, p.ParentId,p.Id Post_Id, u.DisplayName uSERDisplayName, OwnerUserId Post_OwnerUserId, OwnerDisplayName Post_OwnerDisplayName, p.Title Post_Title FROM USERS u, POSTS p WHERE --u.id = p.OwnerUserId u.id = p.ParentId and u.id < 1000 ORDER BY u.DisplayName ASC , p.CreationDate DESC */ /*SELECT SYSDATETIME() ,SYSDATETIMEOFFSET() ,SYSUTCDATETIME() ,CURRENT_TIMESTAMP ,GETDATE() ,GETUTCDATE(); */ /* Returned: SYSDATETIME() 2007-04-30 13:10:02.0474381 SYSDATETIMEOFFSET()2007-04-30 13:10:02.0474381 -07:00 SYSUTCDATETIME() 2007-04-30 20:10:02.0474381 CURRENT_TIMESTAMP 2007-04-30 13:10:02.047 GETDATE() 2007-04-30 13:10:02.047 GETUTCDATE() 2007-04-30 20:10:02.047 */ /*SELECT CONVERT (date, SYSDATETIME()) ,CONVERT (date, SYSDATETIMEOFFSET()) ,CONVERT (date, SYSUTCDATETIME()) ,CONVERT (date, CURRENT_TIMESTAMP) ,CONVERT (date, GETDATE()) ,CONVERT (date, GETUTCDATE()); */ /*DECLARE @date DATETIME = GETDATE(); SELECT EOMONTH ( @date ) AS 'This Month'; SELECT EOMONTH ( @date, 1 ) AS 'Next Month'; SELECT EOMONTH ( @date, -1 ) AS 'Last Month';*/ SELECT EOMONTH ( GETDATE() ) AS 'This Month';