INSERT INTO VS4TBankPattern
           (TBnPCode
           ,TBnPTBnkCode
           ,TBnPType
           ,TBnPTCBBNo
           ,TBnPName
           ,TBnPUploadCode
           ,TBnPUploadCustom1
           ,TBnPPatternFile
           ,TBnPOutputFile
           ,TBnPFlag1)
     VALUES
           ('BBL'
           ,'BBL'
           ,0
           ,''
           ,''
           ,''
           ,''
           ,'BBL.PAT'
           ,'COMDAT.DAT'
           ,1)
GO
INSERT INTO VS4TBankPattern
           (TBnPCode
           ,TBnPTBnkCode
           ,TBnPType
           ,TBnPTCBBNo
           ,TBnPName
           ,TBnPUploadCode
           ,TBnPUploadCustom1
           ,TBnPPatternFile
           ,TBnPOutputFile
           ,TBnPFlag1)
     VALUES
           ('KBANK'
           ,'KBANK'
           ,0
           ,''
           ,''
           ,''
           ,''
           ,'KBANK.PAT'
           ,'DATAFILE.TXT'
           ,1)
GO
INSERT INTO VS4TBankPattern
           (TBnPCode
           ,TBnPTBnkCode
           ,TBnPType
           ,TBnPTCBBNo
           ,TBnPName
           ,TBnPUploadCode
           ,TBnPUploadCustom1
           ,TBnPPatternFile
           ,TBnPOutputFile
           ,TBnPFlag1)
     VALUES
           ('SCB'
           ,'SCB'
           ,0
           ,''
           ,''
           ,''
           ,''
           ,'SCB.PAT'
           ,'DATA.TXT'
           ,1)
GO
INSERT INTO VS4TBankPattern
           (TBnPCode
           ,TBnPTBnkCode
           ,TBnPType
           ,TBnPTCBBNo
           ,TBnPName
           ,TBnPUploadCode
           ,TBnPUploadCustom1
           ,TBnPPatternFile
           ,TBnPOutputFile
           ,TBnPFlag1)
     VALUES
           ('UOB'
           ,'UOB'
           ,0
           ,''
           ,''
           ,''
           ,''
           ,'UOB.PAT'
           ,'PAY_UOB.TXT'
           ,1)
GO
UPDATE VS4TBankPattern SET TBnPUploadCode=(SELECT TBnkUploadCode FROM VS4TBank WHERE VS4TBank.TBnkCode=VS4TBankPattern.TBnPTBnkCode)
GO