Annemie19 Posted November 4, 2020 Report Share Posted November 4, 2020 Hi There, I have the following table that I created from the below query SELECT d.DealID, d.DealNumber, d.NominalAmount, --i.StartDate, DATEADD(day, -1, i.EndDate) AS [AdjustedEndDate], i.Rate, cp.ProjStartDate, cp.ProjEndDate, dir.InterestMultiplier from [dbo].[VwPrefSharesDeal] d JOIN VwPrefSharesCashProjection cp on cp.DealHashKey = d.DealHashKey JOIN [dbo].[VwPrefSharesDealInterBankRelation] dir ON d.DealHashKey = dir.DealHashKey JOIN [dbo].[VwPrefSharesBank] b ON dir.InterestBankHashKey = b.BankHashKey JOIN [dbo].[VwPrefSharesInterest] i ON b.BankHashKey = i.BankHashKey WHERE DealID = 'SI001263-03' and ProjStartDate = '2020-03-31 23:59:59.0000000' ORDER BY i.StartDate I want to show the start date as the ProjStartDate = '2020-03-31 23:59:59.0000000' when the ProjStart date is after the startdate and the AdjustedEndDate as and ProjEndDate = '2020-09-30 23:59:59.0000000'. For instance, I only want to see the following dates I have tried Case When, but I cannot get it to work. Link to comment Share on other sites More sharing options...
niche Posted November 5, 2020 Report Share Posted November 5, 2020 https://www.w3schools.com/sql/sql_between.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now