Sorry, i don't understand what you actually want.
Might be replacing the WHERE condition with a CASE in the SET, like:
set col = case when Customer_Account_Connect_Date < Fiscal_Month_Start_Date then xxx else yyy end
I want to modify the below update statement(bold highlighted below) .
Issue is if connect date is less than beginning of month date (1st of the month) then Reconnect (Cnt and rev) else New connect (Cnt and rev)
For June 2012 month (May 22nd to June 21st)
Any subscriber having connect date less than June 1st is a Reconnect else they are new connect.
SELECT Customer_Account_id, CUST_DETAIL_MTHLY_SNAPSHOT_ID FROM
WHERE x.FSCL_MONTH_ID = (
SELECT y.PERIOD_ID FROM VT_COENDMONTH_DT Y)
and x.NEW_CUST_CNT = 1
AND x.Customer_Account_id IN
(SELECT DISTINCT (y.Customer_Account_id) FROM &TTDDBASEVW.CUSTOMER_ACCOUNT y
CROSS JOIN VT_COENDMONTH_DT
WHERE Customer_Account_Connect_Date < Fiscal_Month_Start_Date)
SET NEW_CUST_CNT = 0,
NEW_CUST_REV = 0.00
WHERE CUST_DETAIL_MTHLY_SNAPSHOT_A.Customer_Account_id = B.Customer_Account_id
and CUST_DETAIL_MTHLY_SNAPSHOT_A.CUST_DETAIL_MTHLY_SNAPSHO T_ID =