Hello Femitha,
On 2/17/2014 12:16 AM, Femitha Majeed wrote:
Hi,
Please help me by answering this question.
Currently we've a database link between Oracle database and MySQL database using
mysql-connector-odbc-5.1.8, will this connector work if I change my MySQL to
enterprise edition ?
Thank
On Feb 12, 2014, at 6:30 PM, Larry Martell wrote:
Try adding a having clause, e.g.:
SELECT `ip`,`page`,`url`,`time_stamp`
FROM `ip_addresses`
WHERE (`time_stamp` BETWEEN date_add( CURDATE(), INTERVAL -1 DAY ) AND
CURDATE() - INTERVAL 1 SECOND)
AND TRIM(`referrer`) LIKE ''
HAVING
Hi Jennifer,
please try filtering with a subquery that locates ip addresses with more than 1
attempt:
SELECT ip, page, url, time_stamp
FROM ip_adresses
WHERE existing where clause AND
ip IN (SELECT ip
FROM ip_addresses
WHERE existing where clause
On Feb 17, 2014, at 10:17 AM, Roy Lyseng wrote:
please try filtering with a subquery that locates ip addresses with more than
1 attempt:
Hi Roy,
That did it! Thank you so much!!! Now I just need to study that IN
clause to see what's going on there.
If this is too slow, you may
Hi Jennifer,
great that it worked.
Try replacing the line
`ip` IN (temp_ip)
with
`ip` IN (SELECT ip FROM temp_ip)
Each subquery needs to be a complete SELECT query.
Thanks,
Roy
On 17.02.14 21:11, Jennifer wrote:
On Feb 17, 2014, at 10:17 AM, Roy Lyseng wrote:
please try filtering
Hi Jennifer,
On 2/17/2014 3:11 PM, Jennifer wrote:
CREATE TEMPORARY TABLE temp_ip AS
(SELECT `ip`
FROM `ip_addresses`
WHERE (`time_stamp` BETWEEN date_add( CURDATE(), INTERVAL -1 DAY ) AND
CURDATE() - INTERVAL 1 SECOND)
AND TRIM(`referrer`) LIKE ''
GROUP BY `ip`
HAVING
On Feb 17, 2014, at 12:36 PM, Roy Lyseng wrote:
Try... `ip` IN (SELECT ip FROM temp_ip)
Wow! Only 1 second to return the results now!! That's 15x faster!!!
Each subquery needs to be a complete SELECT query.
That's good to know. I figured that since temp_ip referenced a