Thanks saravanan..excellent it worked...
select min(iccid),max(iccid) from ( select * , convert(bigint,iccid) - ROW_NUMBER() over (partition by flag order by iccid) RN from club_values where flag =1 ) Tgroup by RN
No comments:
Post a Comment