Guys/Gals I have two tables, first one is 'Calls' which is having a list of telephone calls captured from a pbx and the second one is having the 'tariff' for international destinations. Pls find some sample data below :-CallscDate cTime Party1 Party2 Party3 cDuration DigitsDialed7/1/2010 12:13:00 PM 7209 372 00:00:10 00271190244807/1/2010 12:10:00 PM 7209 373 00:00:05 00271190244807/1/2010 12:14:00 PM 7209 373 00:00:38 00278256017767/1/2010 10:05:00 AM 7209 375 00:36:26 00642123100057/1/2010 10:03:00 AM 7209 372 00:00:05 0064212310057/1/2010 11:04:00 AM 7209 376 01:00:10 0064480256977/5/2010 12:04:00 PM 7209 372 00:26:35 00271190244807/7/2010 5:54:00 PM 7209 373 00:14:42 00271190244807/15/2010 4:40:00 PM 7209 373 00:09:56 00441464851166
TariffCountry IDDCode Normal OffPeakUSA / Canada 001 $2.12 $1.37Bahamas 001242 $5.63 $5.00Guam 001671 $4.09 $3.27Egypt 0020 $2.40 $1.89Morocco 00212 $2.69 $1.91Algeria 00213 $2.40 $1.89Tunisia 00216 $2.40 $1.89Libya 00218 $3.21 $2.81Gambia 00220 $2.95 $2.43Senegal 00221 $2.69 $1.91Mauritania 00222 $2.40 $1.89Mali 00223 $3.53 $3.00
What I would like to do is to link calls.digitsdialed (the first 4/5 chars) and tariff.iddcode so that I can extract the call charges for each call from the tariff table; now the trouble is the IDD code length is not constant so I'm searching for a way to like these columns together. Appreciate your help in advance.Russel