Merge pull request #300 feature-NEWDWH2021-1288-crm_distribution_Product_Metrics_vod__c_fix into develop-4-crm-medical
This commit is contained in:
commit
a5e58ebc7e
@ -1,3 +1,7 @@
|
|||||||
|
-- A5M2で実行時に[SQL] - [スラッシュ(/)のみの行でSQLを区切る]に変えてから実行する
|
||||||
|
-- $$から始まる文字は後からREPLACEする文字を示す独自ルール
|
||||||
|
-- 当ストアドプロシージャは、同一セッション内での並列処理を実行することができない
|
||||||
|
-- 実行者の権限でストアドプロシージャを実行するために、「SQL SECURITY INVOKER」を付与している
|
||||||
CREATE PROCEDURE `internal02`.`crm_distribution_Product_Metrics_vod__c`()
|
CREATE PROCEDURE `internal02`.`crm_distribution_Product_Metrics_vod__c`()
|
||||||
SQL SECURITY INVOKER
|
SQL SECURITY INVOKER
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -63,7 +67,7 @@ SET @upsert_statement_base =
|
|||||||
FROM
|
FROM
|
||||||
internal02.crm_Product_Metrics_vod__c AS internaltb
|
internal02.crm_Product_Metrics_vod__c AS internaltb
|
||||||
WHERE
|
WHERE
|
||||||
Id = ?
|
internaltb.Id = ?
|
||||||
ON DUPLICATE KEY UPDATE
|
ON DUPLICATE KEY UPDATE
|
||||||
IsDeleted = internaltb.IsDeleted, Name = internaltb.Name, CreatedDate = internaltb.CreatedDate,
|
IsDeleted = internaltb.IsDeleted, Name = internaltb.Name, CreatedDate = internaltb.CreatedDate,
|
||||||
CreatedById = internaltb.CreatedById, LastModifiedDate = internaltb.LastModifiedDate,
|
CreatedById = internaltb.CreatedById, LastModifiedDate = internaltb.LastModifiedDate,
|
||||||
@ -112,7 +116,7 @@ TableCursorLoop: LOOP
|
|||||||
LEAVE TableCursorLoop;
|
LEAVE TableCursorLoop;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SET @distribution_schema = get_distribution_to_schema('crm_Product_Metrics_vod__c', 'medaca_parent_msj_product_classification__c', target_column_value);
|
SET @distribution_schema = internal02.get_distribution_to_schema('crm_Product_Metrics_vod__c', 'medaca_parent_msj_product_classification__c', target_column_value);
|
||||||
SET @temp_table_id = temp_table_id;
|
SET @temp_table_id = temp_table_id;
|
||||||
|
|
||||||
SET @upsert_statement = REPLACE(@upsert_statement_base, "$$distribution_schema$$", @distribution_schema);
|
SET @upsert_statement = REPLACE(@upsert_statement_base, "$$distribution_schema$$", @distribution_schema);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user