Hi Everyone,

Here is the brief description of my Question... Please help me out... iam new to SQL Server.......

I had one table named 'Policy_Rpt.ILRCL' in a database. This table is populated by procedure named 'Policy_Rpt.usp_ILRCL'.

Now I created One more table named 'Policy_rpt.Agency'
This table has all the columns with same data from 'Policy_Rpt.ILRCL' . I added a new column called 'ClaimStatus' with initial value Null ..

I populated this table using the following command.

Insert into Policy_rpt.Agency (columns........) Select * from Policy_Rpt.ILRCL.

Now i need to add the following functionality for the new column 'ClaimStatus'. How can i do it...

Functionality:

Now, there is CurrentReserveAmount column in this table which may contain either '0' or a value.

For each ClaimNumber, I have to determine if sum(CurrentReserveAmount) is not equal to zero at last month end.

If CurrentReserveAmount <> 0 then ClaimStatus = Open
If CurrentReserveAmount = 0 then ClaimStatus = Closed

Now i just need to check CurrentReserveAmount Value and need to update the ClaimStatus as open/closed...........

Please Help me out.................

* All data rows contain same Status value