Or if you want work just with the number and if you have a costant V before the number you can use:
SELECT max(RIGHT(VoucherNo,3)) AS maxNU, min(RIGHT(VoucherNo,3)) AS minNU, TransNo FROM T1 group by TransNo
No comments:
Post a Comment