﻿








CREATE   FUNCTION [dbo].[fds__fn_bankingtransaction_id] (
)
RETURNS varchar(10)
AS
BEGIN
  DECLARE @NewAccount varchar(7) = [dbo].[ocms_fn_generatePassword] (8,0,1,0);

  WHILE EXISTS( SELECT * FROM [dbo].[fds__bankingtransactions] WITH (SERIALIZABLE) WHERE [taID] = @NewAccount)
	BEGIN
		SET @NewAccount = [dbo].[ocms_fn_generatePassword] (8,0,1,0);
	END

  RETURN @NewAccount;
END;