IF anyone is curious I have found a solution. It involves creating a 2nd table for mobile numbers, selecting them all then excluding them from the initial test.
I'm pretty sure extra spaces are ignored. I have also tried the extra %. It's almost behaving like there are 2 entries for Australia with each of the country codes in the table but there isn't. If this helps, the country table looks like
LANDLOC CODE CHARGE
Australia...
I'm not sure it is but I won't rule it out. Thing is I can only have one of the OR'd functions and remove the rest and it still doesn't work right e.g.
If dst=0061xxxxxxx
(Mid(cdr.dst,1,4)=country.code) AND country.landloc Not Like '%Mobile')
Will return
Australia AND Australia Mobile...
The CASE section for month is a value passed through from a website where the customer can enter the month required and is only for display purposes and can be ignored.
This is MySQL. I have posted in another section but haven't had any useful replies.
Subtlties aside from various...
The following SQL is for phone billing.
cdr.dst=number dialed.
Country table fields are code=area prefix, landloc=geographical location ("Australia" OR "Australia Mobile" for example) and charge=per minute value.
There is a huge variation of country prefix and in the WHERE clause you can see...
The following SQL is for phone billing.
cdr.dst=number dialed.
Country table fields are code=area prefix, landloc=geographical location (Australia OR Australia Mobile for example) and charge=per minute value.
There is a huge variation of country prefix and in the WHERE clause you can see I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.