to throw the error you can do check like this
IF EXISTS(SELECT 1
FROM TblLandriverSegment
GROUP BY riverSegment
HAVING COUNT(DISTINCT CbSegId) > 1
)
RAISERROR 'Multiple Cbsegids found on same riverSegment',16,1
ELSE
... your update
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://ift.tt/19nLNVq http://ift.tt/1iEAj0c
No comments:
Post a Comment