select t.* , case when u.user_id is not null then 1 else 0 end as flag
from shenll_gprs_flow_200908 t left join dw_user_m_200908 u
on t.user_id=u.user_id and u.is_bill=1 and u.user_type not in(2,3,4) and t.area_id='570'

select t.* , case when u.user_id is not null then 1 else 0 end as flag
from shenll_gprs_flow_200908 t left join dw_user_m_200908 u
on t.user_id=u.user_id
where u.is_bill=1 and u.user_type not in(2,3,4) and t.area_id='570'

$db2 “restore db sample from /db2home2/db2inst2/dbbackup taken at 20100409114802 replace existing without prompting”
SQL2540W Restore is successful, however a warning “2539″ was encountered
during Database Restore while processing in No Interrupt mode.

这时如果连接数据库，会报如下错误：

$db2 connect to sample
SQL1117N A connection to or activation of database “SAMPLE” cannot be made
because of ROLL-FORWARD PENDING. SQLSTATE=57019