USE [OJKLogBookDB]
GO

/****** Object:  UserDefinedFunction [dbo].[tuker]    Script Date: 20/04/2021 15:43:40 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE FUNCTION [dbo].[tuker]
(
	@string VARCHAR(MAX)
)
RETURNS VARCHAR(MAX)
AS
BEGIN

	DECLARE 
		@kecil VARCHAR(MAX),
		@hasil VARCHAR(MAX)

	select @kecil = replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(@string collate Latin1_General_CS_AS,'o','e'),'a','o'),'i','a'),'u','i'),'t','p'),'c','k'),'d','s'),'r','g'),'j','l'),'k','f'),'b','m'),'n','q'),'w','y')
	select @hasil = replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(@kecil collate Latin1_General_CS_AS,'O','E'),'A','O'),'I','A'),'U','I'),'T','P'),'C','K'),'D','S'),'R','G'),'J','L'),'K','F'),'B','M'),'N','Q'),'W','Y')

	RETURN @hasil

END
GO


