Hi everybody,
I have the following select statement
select SomeFields, StartPos, EndPos from myTable where StartPos <= m.tnEnd and EndPos >= m.tnStart
to get all records within a passed range.
However, I also pass tnIncrement and my ranges are from tnStart to tnEnd incremented by tnIncrement. So, using the SQL above I also want to add StartRange and EndRange fields to identify which inner range the records fallen into. Somehow I can not really get my math straight and can use a hand here.
Thanks in advance.
If it's not broken, fix it until it is.
My Blog