connected
sfa_source_connDB Connected
---- t2 Droped 2025-12-06 10:34:46drop table if exists t2
---- End Time ---2025-12-06 10:34:47
--affected rows--0
---- t2 Created 2025-12-06 10:34:47create table t2
select products.division, products.productcode, products.productcode as sa_prod_code, products.productname,productbrandtype.productbrandtype as brand_name, '' as range_name, products.productbrandtype as productbrandid,
0000000000 as productsubbrandid, 0 as flag, products.productid as productid
from products
INNER JOIN productbrandtype on productbrandtype.productbrandtypeid = products.productbrandtype
where productcategory='R'
group by products.division, products.productcode
---- End Time ---2025-12-06 10:34:49
--affected rows--826
---- productbrand Insert 2025-12-06 10:34:49insert into productbrand
select productbrandid, division as divisionid, brand_name as productbrand, '' as brandtype, 0 as deleted, '0000-00-00' as deleted_date, now() as created_date
from t2
where t2.productbrandid not in (select productbrand.productbrandid from productbrand where deleted=0)
GROUP BY t2.productbrandid
---- End Time ---2025-12-06 10:34:49
--affected rows--0
---- End Time ---2025-12-06 10:34:49
--affected rows--0
---- product_master update 2025-12-06 10:34:49insert into products_master
(productid,productsubbrandid,divisionid,productcode,productname,productcategory,deleted,deleted_date,created_date,productbrandid,sa_prod_code)
select productid, productsubbrandid, division as divisionid,productcode,productname,'R' as productcategory,
0 as deleted, '0000-00-00' as deleted_date, '0000-00-00' as created_date, productbrandid,sa_prod_code
from t2
where flag = 0 and t2.productid not in (select products_master.productid from products_master where deleted=0)
---- End Time ---2025-12-06 10:34:49
--affected rows--0
---- brandname update 2025-12-06 10:34:49update productbrand,productbrandtype
set productbrand.productbrand = productbrandtype.productbrandtype
where productbrand.productbrandid = productbrandtype.productbrandtypeid
---- End Time ---2025-12-06 10:34:49
--affected rows--0
---- productname update 2025-12-06 10:34:49update t2,products_master
set products_master.productname = t2.productname
where t2.productid = products_master.productid and flag=0 and products_master.deleted=0
---- End Time ---2025-12-06 10:34:49
--affected rows--0-----------------------------------------------------------------INSERT INTO Cron_Records (Cron_name, Start_time, End_time, Execution_time, Date) VALUES ('products_upload','10:34:46','10:34:49','00:00:03','2025-12-06');
--affected rows--1
CRON EXECUTED SUCCESSFULLY
---- End Time ---2025-12-06 10:34:50
--affected rows--1