Please help me to write this procedure to get auto-increment alphanumeric id in ms sql server : CREATE PROC Usp_GetNewInquiryId
AS 
BEGIN
	IF NOT EXISTS(SELECT InquiryId FROM JobPortal.dbo.tblContact)
		DECLARE @PrefixValue VARCHAR(10)='INQ'
		DECLARE @InitialValue DECIMAL(10)=1001
		SELECT InquiryId = @PrefixValue+CAST(ISNULL(MAX(InquiryId),@InitialValue) AS VARCHAR(10)) FROM JobPortal.dbo.tblContact
		
	ELSE
		/* here i wanna eliminate the word 'INQ' from 'INQ1001' towards left side and do increment 1002 from 1001, lastly wanna select INQ1002 and so on... */
END