我有两个表,一个是event,另一个是event。我必须从表agreement\事件中选择列podium\ delivery\ date、agreement\ id、data\ source\ type\ cd
我必须选择列
rc、channel、sub\u channel、event\u start\u dttm、event\u subtype\u cd、event\u activity\u type\u cd、event\u desc和employeeid
从表事件。
逻辑是event.event\u id=agreement\u event.event\u id and event\u activity\u type\u cd='更新地址\电话号码'
我的解决办法是
SELECT agreement_event.Podium_delivery_date, agreement_event.Agreement_ID, agreement_event.data_source_type_cd, event.RC, event.Channel, event.Sub_channel, event.Event_Start_DTTM,event.Event_Subtype_CD, event.Event_Activity_type_cd, event.Event_desc, event.EmployeeID
FROM agreement_event
JOIN event
ON
event.event_ID = agreement_event.event_ID
WHERE event_activity_type_cd = 'UPDATE_ADDRESS_PHONE_NUMBER'
对于这种特殊情况,这是正确的查询吗?
暂无答案!
目前还没有任何答案,快来回答吧!