INSERT INTO DB_EDITS.dbo.m_transaction_type
        (transaction_type_code,
         transaction_category_id,
         description,
         remarks,
         created_by,
         created_date,
         modified_by,
         modified_date,
         is_delete)
SELECT
  'T'+RIGHT('00000'+CAST((ROW_NUMBER() OVER(ORDER BY seq_no)+3) AS VARCHAR(2)),6) AS 'Row Number',
  2,
  RTRIM(LTRIM(REPLACE(description,'PS - ',''))),
	'',
	'PPM',
	GETDATE(),
	'PPM',
	GETDATE(),
	'0'
FROM
	webBranches.dbo.transaction_type
WHERE
  description LIKE 'PS%'
  AND status = 'I'
ORDER BY
  seq_no



INSERT INTO DB_EDITS.dbo.m_transaction_type
        (transaction_type_code,
         transaction_category_id,
         description,
         remarks,
         created_by,
         created_date,
         modified_by,
         modified_date,
         is_delete)
SELECT
  'T'+RIGHT('00000'+CAST((ROW_NUMBER() OVER(ORDER BY seq_no)+3) AS VARCHAR(2)),6) AS 'Row Number',
  3,
  RTRIM(LTRIM(REPLACE(description,'CL - ',''))),
	'',
	'PPM',
	GETDATE(),
	'PPM',
	GETDATE(),
	'0'
FROM
	webBranches.dbo.transaction_type
WHERE
  description LIKE 'CL%'
  --AND status = 'I'
ORDER BY
  seq_no


INSERT INTO DB_EDITS.dbo.m_transaction_type
        (transaction_type_code,
         transaction_category_id,
         description,
         remarks,
         created_by,
         created_date,
         modified_by,
         modified_date,
         is_delete)
SELECT
  'T'+RIGHT('00000'+CAST((ROW_NUMBER() OVER(ORDER BY seq_no)+3) AS VARCHAR(2)),6) AS 'Row Number',
  1,
  RTRIM(LTRIM(REPLACE(description,'NB - ',''))),
	'',
	'PPM',
	GETDATE(),
	'PPM',
	GETDATE(),
	'0'
FROM
	webBranches.dbo.transaction_type
WHERE
  description LIKE 'NB%'
  --AND status = 'I'
ORDER BY
  seq_no
  