SELECT
	*
FROM
	dbo.web_user
WHERE
  [user_name] LIKE '%bankanda%'

-- 1. cek cabang
SELECT DISTINCT c.id_cabang, c.nama_cabang, c.singkatan, c.id_cabang_induk 
FROM AJK.dbo.cabang c LEFT JOIN AJK.dbo.polis p ON c.id_perusahaan=p.id_perusahaan 
WHERE c.status='I' AND p.no_polis IN ('14027-01-000', '14028-01-000') -- nomor polis (varchar)
ORDER BY c.id_cabang_induk, c.nama_cabang

-- 2. input username manual, trus dapet id_usernya

DECLARE @username varchar(40)
DECLARE @password varchar(120)
DECLARE @nama varchar(100)
DECLARE @id_cabang varchar(4)
SET @username = 'bankandamataram'  -- username
SET @password = '8B69mAppTkiFjDj6_xY2xROMGsF8V1DZuQ4uOQdT8BA'  -- password
SET @nama = 'PT BANK ANTAR DAERAH - Cab Mataram'  -- nama perusahaan
SET @id_cabang = '1200' -- id

INSERT INTO [WebAJK].[dbo].[web_user]
           ([user_name]
           ,[password]
           ,[nama]
           ,[id_cabang]
           ,[status])
     VALUES
           (@username
           ,@password
           ,@nama
           ,@id_cabang
           ,'I')
GO

SELECT SCOPE_IDENTITY() AS 'Hasil id_user'

-- 3. inputin user menu

DECLARE @id_user smallint
SET @id_user = 425  -- id_user (smallint)

INSERT INTO [WebAJK].[dbo].[web_user_menu]
           ([id_user]
           ,[id_menu_group]
           ,[status]
           ,[create_date]
           ,[create_by])
     VALUES
           (@id_user
           ,'2'
           ,'I'
           ,GETDATE()
           ,'SYS')
GO

-- 4. inputin user polis

DECLARE @id_user smallint
SET @id_user = 425  -- id_user (smallint)

INSERT INTO [WebAJK].[dbo].[web_user_polis]
           ([id_user]
           ,[no_polis])
     VALUES
           (@id_user
           ,'14027-01-000')  -- no polis

INSERT INTO [WebAJK].[dbo].[web_user_polis]
           ([id_user]
           ,[no_polis])
     VALUES
           (@id_user
           ,'14028-01-000')  -- no polis


-- tambahkan sendiri jika lebih banyak

--UPDATE
--  dbo.web_user
--SET
--  grup = 'aga'
--WHERE
--  id_user = 397
