hi friends, i am new to sql server2005 and i want to create a procedure or cursor
which would work like, i have two table one having the country codes and another having the dialed digits along with the country codes, the problem is i want to select one countrycode match that code with the records from dialed digits table and extract all the record to a temp table and after that want to calculate the total record and sum of their minutes the data look like this
country table
mexico | 52
guatemala | 502
India | 91
pakistan 92
SriLanka |94
dialed digits table
07/23/2008 00:00:04 | 7809787411 | 919911599771 | 1163 | 1163 | 0.755950
07/23/2008 00:00:20 | 6046858944 | 919868012693 | 205 | 205 | 0.133250
07/23/2008 00:00:29 | 6048200105 | 911635269141 | 1039 | 1039 | 0.769899
07/23/2008 00:00:32 | 3032432360 | 50278440297 | 6 | 6 | 0.005250
which would work like, i have two table one having the country codes and another having the dialed digits along with the country codes, the problem is i want to select one countrycode match that code with the records from dialed digits table and extract all the record to a temp table and after that want to calculate the total record and sum of their minutes the data look like this
country table
mexico | 52
guatemala | 502
India | 91
pakistan 92
SriLanka |94
dialed digits table
07/23/2008 00:00:04 | 7809787411 | 919911599771 | 1163 | 1163 | 0.755950
07/23/2008 00:00:20 | 6046858944 | 919868012693 | 205 | 205 | 0.133250
07/23/2008 00:00:29 | 6048200105 | 911635269141 | 1039 | 1039 | 0.769899
07/23/2008 00:00:32 | 3032432360 | 50278440297 | 6 | 6 | 0.005250
Comment