Quantcast
Channel: Questions in topic: "variables"
Viewing all articles
Browse latest Browse all 49

Deleting Specific Number of Records Per id

$
0
0
We have 67 id's each of which contain x number of emails. So id 1 may have 10000, id 2 may have 12,350... The client wants 12,500 per id final. Before we send to the program to remove the bad emails, however, if we only need 12,350 per id final, we don' t want to send the program, for example, 100,000 records for an id meaning we need 12,350 per id, and id 1 may have 18,500, id 2 may have 300,000 and we want to remove excess records before we send to the program. We have to keep some overage because the program is removing bad emails. So if we only need 12,350 per id, we want to send, say, 14000 per id to the program. Yet, each id has a differnet number of records so we cannot remove a constant number of records from each id: id 1 may need 4000 removed, id 50 may need 25000 removed. I am wondering if we can write a simple piece ode that will remove excess records, but a different amount for each id. So, if we only need 12,500 per id. I wanto to send to the program 14,000 per id. How do I remove enough records per id when each id has a different number of records? DELETE x#records -14000 where ID =1 DELETE x#records - 14000 where ID =2

Viewing all articles
Browse latest Browse all 49

Trending Articles