Unsupported subquery type cannot be evaluated

自作多情 提交于 2020-05-17 06:22:26

问题


The inner query is giving problem.

MERGE INTO evaluation_fact eval_fact 
USING (SELECT $27 tim_id , $28 dt_id , $13 w_id 
       FROM @REPORTING_MERGE_STAGE/reporting-data-ingest/Evaluation-IT.csv) csv_data 
      ON eval_fact.w_id = csv_data.w_id 

WHEN matched THEN 
    UPDATE 
        SET tim_id = (SELECT day_id FROM rom dates_dim d 
                      WHERE d.day_id = csv_data.tim_id), 
            dt_id = (SELECT time_id FROM time_dim t 
                     WHERE t.time_name = csv_data.dt_id) 

WHEN NOT matched THEN 
    INSERT (tim_id, dt_id) 
    VALUES ( (SELECT day_id FROM dates_dim d 
              WHERE d.day_id = csv_data.tim_id),
             (SELECT time_id FROM time_dim t 
              WHERE t.time_name = csv_data.dt_id) );

Note : I am adding this question again because for older one I didn't have access to edit. Kindly excuse.

来源:https://stackoverflow.com/questions/61604487/unsupported-subquery-type-cannot-be-evaluated

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!