Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select 'TR'+RIGHT(REPLICATE('0',3)+CAST(isnull(MAX(EQUIPMENT_S),0)+1 as varchar(3)),3)+'PIEP'+cast(YEAR(getdate()) as varchar(4))
- from dbo.equipment
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement