Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select Sys.StartDate, Sys.EndDate, Sys.ECN, Fee.Route, Sys.LiqFlag
- from VanDam.dbo.IsSystematic as Sys
- LEFT join (Select Route, Flag, Fee, ExchProfile, MAX(EndDate) as EndDate, MIN(StartDate)as StartDate
- from VanDam.dbo.FeeSchedule
- GROUP BY Route,ExchProfile, Tape, Flag,Tier, Fee, Type) as Fee on Fee.StartDate=Sys.StartDate
- and Sys.EndDate= Fee.EndDate
- and Sys.ECN=Fee.ExchProfile
- and Sys.LiqFlag=Fee.Flag
- and Fee.Fee = Sys.[Real Rate Per Share for Flag]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement