Attempt for the third time to write a message. Please do not delete, this is not spam. Thanks for answers. 1. Why I do not use 1 step with direct access to sql. The answer is: read better and more correct 2. It does not look like DIS code I answer: this request is taken from the job log 3. You are referencing an alias of TABLE1, but your query only defines alias of TABLE2 and TABLE3. What actual table are you trying to reference? You need to include it in the FROM clause. I answer: The table in the request is indicated, if you look carefully, please: SELECT DISTINCT table1. "PLAYER_GATE_ID" AS player_gate_id, table1. "WWW_ID" AS www_id FROM ( SELECT DISTINCT player_main. "PLAYER_GATE_ID", player_main. "WWW_ID" FROM cmdm.player_main player_main LEFT JOIN ci_common.award_missioner award_missioner ON player_main. "PLAYER_GATE_ID" = award_missioner . "PLAYER_GATE_ID" WHERE (award_missioner. "PLAYER_GATE_ID" IS NULL) AND ((player_main. "WWW_ID" IS NOT NULL) AND (player_main. "WWW_REG_STATUS" = 'REGISTERED')) ) table1 I forgot to clarify. If you change the aliases of table1 to table2, in the step where the error occurs. That request fulfills successfully on the oracle base. INSERT INTO ci_common.award_missioner (
"PLAYER_GATE_ID",
"AWARD_ID",
"UPDATE_DATE",
"WWW_ID"
)
SELECT DISTINCT
/*table2*/ table3.player_gate_id AS player_gate_id,
10005 AS award_id,
to_timestamp('
11FEB2020:16:36:25.7171', 'DDMONYYYY:HH24:MI:SS.FF', 'NLS_DATE_LANGUAGE=American') AS update_date,
/*table2*/ table3.www_id AS www_id
FROM
(
SELECT DISTINCT
/*table1*/ table2."PLAYER_GATE_ID" AS player_gate_id,
10005 AS award_id,
to_timestamp('
11FEB2020:16:36:25.7171', 'DDMONYYYY:HH24:MI:SS.FF', 'NLS_DATE_LANGUAGE=American') AS update_date
,
/*table1*/ table2."WWW_ID" AS www_id
FROM
(
SELECT DISTINCT
table1."PLAYER_GATE_ID" AS player_gate_id,
table1."WWW_ID" AS www_id
FROM
(
SELECT DISTINCT
player_main."PLAYER_GATE_ID",
player_main."WWW_ID"
FROM
cmdm.player_main player_main
LEFT JOIN ci_common.award_missioner award_missioner ON player_main."PLAYER_GATE_ID" = award_missioner
."PLAYER_GATE_ID"
WHERE
( award_missioner."PLAYER_GATE_ID" IS NULL )
AND ( ( player_main."WWW_ID" IS NOT NULL )
AND ( player_main."WWW_REG_STATUS" = 'REGISTERED' ) )
) table1, cmdm.player_add_services player_add_services
LEFT JOIN ci_common.award_missioner_dop award_missioner_dop ON player_add_services."PLAYER_GATE_ID" =
award_missioner_dop."PLAYER_GATE_ID"
WHERE
( table1."PLAYER_GATE_ID" = award_missioner_dop."PLAYER_GATE_ID" )
AND ( ( award_missioner_dop."PLAYER_GATE_ID" IS NULL )
OR ( player_add_services."PLAYER_FRIEND_CNT" > award_missioner_dop."PLAYER_FRIEND_CNT" ) )
AND ( ( player_add_services."FRIEND_FLG" = 'Y' )
AND ( player_add_services."PLAYER_FRIEND_CNT" >= 1 ) )
) table2
) table3
... View more