Are you extracting the LocationId, CenterId and SequenceID all based on some criteria? If so what is that? You can use something like this.
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.
- Vijay G
Strive for Perfection