Hi Srichary,
Are you extracting the LocationId, CenterId and SequenceID all based on some criteria? If so what is that? You can use something like this.
Code:
SELECT 'WD' + cast(LocationId as varchar(5)) + cast(CenterId as varchar(5)) +
(select Cast(Coalesce(1,max(SequenceId)) as varchar(5))
FROM TABLENAME WHERE criteria_if_required)
from TABLENAME WHERE criteria_if_required
Hope that helps.
Cheers!
_________________________
- Vijay G
Strive for Perfection