Community Member Profile
- Profile: /members/6645-abhay-maini.htm
- Comments: 3
- Points: 32
Recent Blog Comments By abhay maini
-
Using CASE Statements In A SQL UPDATE Query
Posted on Sep 11, 2010 at 2:15 PM
@Ben, @pinal Thanks Guys, I didnt realize this earlier. COALESCE should do the same. Cheerz... read more »
-
Using CASE Statements In A SQL UPDATE Query
Posted on Aug 11, 2010 at 10:38 AM
@ABHAY, NEVERMIND I GOT IT, btw i am using MERGE i hope the same logic can be applied for simple update aswell. UPDATE SET RTRMNT_FG = CASE WHEN TARGET.RTRMNT_FG IS NULL THEN SOURCE.RTRMNT_FG --UPDATE ONLY WHEN ITS NULL END , DT_OF_RTR... read more »
-
Using CASE Statements In A SQL UPDATE Query
Posted on Aug 11, 2010 at 10:27 AM
What you wrote is fine. Tell me how will you write a sql where you have to update one field only if its null where as other fields should be updated at the same time with no condition. UPDATE TABLE SET A (only if its null)= B.a ,X= B.x ,Y = B.y... read more »



