|
|
@@ -56,7 +56,8 @@ public class ProductTempDao {
|
|
|
|
|
|
public void matchExists(String importId) {
|
|
|
jdbcTemplate.update("Merge Into (Select * From Products_Temp Where Pr_Import_Id=? And Pr_Exist_Id Is Null) T " +
|
|
|
- "Using Products P On (T.Pr_Title=P.Pr_Title And ((T.Pr_Cmpcode=P.Pr_Cmpcode And T.Pr_Brand=P.Pr_Brand) Or (T.Pr_Cmpcode=P.Pr_Pcmpcode And T.Pr_Brand=P.Pr_Pbrand)) " +
|
|
|
+ "Using Products P On ((T.pr_code = P.pr_code Or (T.Pr_Title=P.Pr_Title And T.Pr_Cmpcode=P.Pr_Cmpcode And T.Pr_Brand=P.Pr_Brand) " +
|
|
|
+ "Or (T.Pr_Title=P.Pr_Title And T.Pr_Cmpcode=P.Pr_Pcmpcode And T.Pr_Brand=P.Pr_Pbrand)) " +
|
|
|
"and t.pr_enuu=p.pr_enuu) when matched then update set t.pr_exist_id=p.pr_id", importId);
|
|
|
}
|
|
|
|