If your countrycodes are going to be embedded in the callednumber, you
really need a delimiter like a dash -. Then you can use some string
functions to do the count. Ideally, as others suggested, the country
code should be in its on field/column.
Below is the general idea for the SELECT, of
Hi Ron !
Ron wrote:
-
| customercode | customer name | customerphonenumber | callednumber |
calldate | callstart | callend | callduration | callcost |
How are you storing phone numbers? I don't think there are leading zeroes in
country codes, and country codes are not all the same length. Are you
padding them with leading zeroes to five characters?
If you have padded them so that the first five characters are always the
country code, then you