Hi,
Has anyone used "case when" statement using entity engine ?
Here is the query which I want to generate using the entity engine .....
********************************************************************************
Update velocity_retailer_counter
Set total$ = CASE
WHEN HOUR(TIMEDIFF(NOW(),Last_Update_Date)) > Period_Hours THEN Txn.Value
ELSE (total$ + Txn.Value)
END CASE
,Total_Txns = CASE
WHEN HOUR(TIMEDIFF(NOW(),Last_Update_Date)) > Period_Hours THEN 1
ELSE (total_txns + 1)
END CASE
Where RetailerID = Txn.RetailerID
********************************************************************************
Regards,
Prashant
________________________________
http://www.mindtree.com/email/disclaimer.html