Hello:
I recently got into SQL at work, working on different projects and there is one that I'm stuck on and I'm spinning my wheels and I need some ideas.
Here is the problem:
I have a #temp file in this temp file there are policy records, my fields are policy_no,claimaint_name, draft_date,org_reserve,incurred_loss,expenses_paid.
if the policy numbers are equal with the same draft date I need to add org_reserves for both records and create one record with the fields above. If the draft_date is different I need to take the lowest draft date and create one record with the fields above. The result a table with just one occurance of the the policy and the fields mentioned above. Should I use cursor control? any ideas are welcome.
Thanks.
Nic
I recently got into SQL at work, working on different projects and there is one that I'm stuck on and I'm spinning my wheels and I need some ideas.
Here is the problem:
I have a #temp file in this temp file there are policy records, my fields are policy_no,claimaint_name, draft_date,org_reserve,incurred_loss,expenses_paid.
if the policy numbers are equal with the same draft date I need to add org_reserves for both records and create one record with the fields above. If the draft_date is different I need to take the lowest draft date and create one record with the fields above. The result a table with just one occurance of the the policy and the fields mentioned above. Should I use cursor control? any ideas are welcome.
Thanks.
Nic