IF (
select COUNT(*) AS COUNT from(select distinct SUBSTRING(LandRiverSegment,7,19) as riverseg,CBSegid from wsmpv24Reporting.dbo.TblLandRiverSegment
) as a
group by riverseg
having COUNT(*)>1)>1---check if more than Cbsegid are found ..if yes error if no update
when i run this individually it is showing the count ,---2
but when this part is kept in a Cursor it throws eror
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
can any one please help me
Thanks