应用 where 条件时无法从表中获取数据
Unable to get the data from the table after applying where conditio0n. manually checked all the tables the data is present in it.
Need help in resolving this issue.
I tried changing the where condition but still unable to get the data.
I assume the issue is in below condition however I'm unable to identify it
Below is the code:
SELECT
a.OpportunityCode AS KPMG_Opportunity__c,
CompetitorCode AS Account__c,
CASE
WHEN
b.StageDescription = 'Won'
THEN
'True'
ELSE
'False'
END
AS KPMG_Won_Opportunity__c, c.ConvertedOutcomeReasonCode, b.CloseDate, b.etl_rec_eff_end_ts, d.IsArchived
FROM
bpg_crm_opportunity_refined.oppty_competitors AS a
LEFT JOIN
bpg_crm_opportunity_refined.oppty_header AS b
ON a.opportunitycode = b.OpportunityCode
LEFT JOIN
bpg_oppty_mgmt_trusted.outcomereason_conversion_lkp c
ON b.OpportunityStatusCode_Orig = c.StatusCode
LEFT JOIN
bpg_crm_engagement_trusted.edw_dim_entity d
ON b.PrimaryAccountCode = d.EntityID
WHERE
d.IsArchived != 'false'
and c.ConvertedOutcomeReasonCode != 'Z004A'
and date_part('Year', b.etl_rec_eff_end_ts) = '9999'
应用where条件0n后无法从表中获取数据。手动检查其中存在数据的所有表。
需要帮助来解决这个问题。
我尝试更改where条件但仍然无法获取数据。
我认为问题出在以下情况,但我无法识别它
Unable to get the data from the table after applying where conditio0n. manually checked all the tables the data is present in it.
Need help in resolving this issue.
I tried changing the where condition but still unable to get the data.
I assume the issue is in below condition however I'm unable to identify it
Below is the code:
SELECT
a.OpportunityCode AS KPMG_Opportunity__c,
CompetitorCode AS Account__c,
CASE
WHEN
b.StageDescription = 'Won'
THEN
'True'
ELSE
'False'
END
AS KPMG_Won_Opportunity__c, c.ConvertedOutcomeReasonCode, b.CloseDate, b.etl_rec_eff_end_ts, d.IsArchived
FROM
bpg_crm_opportunity_refined.oppty_competitors AS a
LEFT JOIN
bpg_crm_opportunity_refined.oppty_header AS b
ON a.opportunitycode = b.OpportunityCode
LEFT JOIN
bpg_oppty_mgmt_trusted.outcomereason_conversion_lkp c
ON b.OpportunityStatusCode_Orig = c.StatusCode
LEFT JOIN
bpg_crm_engagement_trusted.edw_dim_entity d
ON b.PrimaryAccountCode = d.EntityID
WHERE
d.IsArchived != 'false'
and c.ConvertedOutcomeReasonCode != 'Z004A'
and date_part('Year', b.etl_rec_eff_end_ts) = '9999'
Unable to get the data from the table after applying where conditio0n. manually checked all the tables the data is present in it.
Need help in resolving this issue.
I tried changing the where condition but still unable to get the data.
I assume the issue is in below condition however I'm unable to identify it
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能是这样的
May be something like this