If you need dynamically adjusting constraints for each independent row, you could do this:
CREATE TABLE dbo.SurveyData
(
StartPostStation int NOT NULL
, StartPostPlus decimal(38,3) NOT NULL
, EndPostStation int NOT NULL
, EndPostPlus decimal(38,3) NOT NULL
, CONSTRAINT StartMin
CHECK ((StartPostStation * 100 + StartPostPlus) > MinStartPost * PostUnits + MinStartPostPlus)
, CONSTRAINT StartMax
CHECK ((StartPostStation * 100 + StartPostPlus) < MaxStartPost * PostUnits + MaxStartPostPlus)
, CONSTRAINT EndMin
CHECK ((EndPostStation * 100 + EndPostPlus) > MinEndPost * PostUnits + MinEndPostPlus)
, CONSTRAINT EndMax
CHECK ((EndPostStation * 100 + EndPostPlus) < MaxEndPost * PostUnits + MaxEndPostPlus)
, MinStartPost int NOT NULL
, MinStartPostPlus decimal(38,3) NOT NULL
, MaxStartPost int NOT NULL
, MaxStartPostPlus decimal(38,3) NOT NULL
, MinEndPost int NOT NULL
, MinEndPostPlus decimal(38,3) NOT NULL
, MaxEndPost int NOT NULL
, MaxEndPostPlus decimal(38,3) NOT NULL
, PostUnits int NOT NULL
);
INSERT INTO dbo.SurveyData (StartPostStation, StartPostPlus, EndPostStation, EndPostPlus
, MinStartPost, MinStartPostPlus, MaxStartPost, MaxStartPostPlus
, MinEndPost, MinEndPostPlus, MaxEndPost, MaxEndPostPlus
, PostUnits)
VALUES (120, 49.2, 175, 80.5 --measurements
, 100, 50.3, 150, 20.65 --valid start post range
, 150, 60.3, 500, 20.75 --valid end post range
, 100); --units per post
Selecting data would look like this:
SELECT StartPost = CONVERT(varchar(10), sd.StartPostStation) + '+' + CONVERT(varchar(50), sd.StartPostPlus)
, EndPost = CONVERT(varchar(10), sd.EndPostStation) + '+' + CONVERT(varchar(50), sd.EndPostPlus)
FROM dbo.SurveyData sd;
Results, like this:
+------------+------------+
| StartPost | EndPost |
+------------+------------+
| 120+49.200 | 175+80.500 |
+------------+------------+