select
substring(t1.called_number from t2.offset),
t1.called_number
from
calls_join as t1,
john_prefix as t2
where
strpos(t1.called_number, t2.prefix) = '1'
order by length(t2.prefix) desc limit '1' ;
I'm having trouble using this as a sub-select in an UPDATE. Most of the
I seem to have a problem with a specific query:
The inside query seems to work on it's own:
select prefix
from john_prefix
where strpos(jpt_test.number,john_prefix.prefix) = '1'
order by char_length(john_prefix.prefix) desc limit 1
but when I
, David Johnston wrote:
On Jan 12, 2012, at 23:31, John Tuliao jptul...@eglobalreach.net
mailto:jptul...@eglobalreach.net wrote:
Hi,
I've been working on this for quite awhile now and don't seem to get
the proper query.
I have basically 4 tables.
1. Table john_test contains the numbers
Hi,
I've been working on this for quite awhile now and don't seem to get the
proper query.
I have basically 4 tables.
1. Table john_test contains the numbers of the calls.
2. Table john_country contains the country with prefix.
3. Table john_clients contains the clients and their sub_id's