I am using SQL Server 2000 and using Reporting Services with Vis Studio to create reports.

I have two tables:

LinkCreate, LinkDelete

LinkCreate contains the columns sessionNum, linkId, freq, timestamp

It shows when a link is created on what frequency and also says which system's link was created (sessionNum)

LinkDelete shows when a link is lost and its columns are: sessionNum, linkId, timestamp.

What I want to do is for the report to display how many links exist for each freq at the instance the end-user refreshes his page. What I tried to do was to count the number of linkIds in LinkCreate for a specific sessionNum and a specific freq, then subtract that from the number of linkIds in LinkDelete. However, I realized taht LinkDelete does not contain freq results. However, the linkIds in linkcreate and delete correspond and are unique for each sessionNum.

How can I copy the freq in LinkCreate and put in LinkDelete corresponding with the proper sessionNum and linkId? Or is there a better way to count the number of links at one time?