473,699 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Whats hte problem with this query???

DELETE FROM poll_log WHERE log_id in (SELECT distinct table1.log_id
FROM poll_log AS table1 JOIN poll_log AS table2 ON table1.IP_addr =
table2.IP_addr and table1.log_id > table2.log_id)
Jul 20 '05 #1
2 1085
Tamir Khason wrote:
DELETE FROM poll_log WHERE log_id in (SELECT distinct table1.log_id
FROM poll_log AS table1 JOIN poll_log AS table2 ON table1.IP_addr =
table2.IP_addr and table1.log_id > table2.log_id)


What version of MySQL are you using? subqueries are supported from
version 4.1.

http://dev.mysql.com/doc/mysql/en/AN...ubqueries.html
Jul 20 '05 #2
Tamir Khason wrote:
DELETE FROM poll_log WHERE log_id in (SELECT distinct table1.log_id
FROM poll_log AS table1 JOIN poll_log AS table2 ON table1.IP_addr =
table2.IP_addr and table1.log_id > table2.log_id)


What version of MySQL are you using? subqueries are supported from
version 4.1.

http://dev.mysql.com/doc/mysql/en/AN...ubqueries.html
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1632
by: adam | last post by:
The folowing code produces an error althought i cant understand why it does this can any one help? THANKS ERROR = Notice: Undefined variable: tab in C:\Inetpub\wwwroot\carpound\table\table1.php on line 32 <?php $link = mysql_connect("localhost","root","admin") or die(mysql_error()); mysql_select_db("car") or die (mysql_error());
9
3836
by: cricketunes | last post by:
Hi folks, this one's had me stumped! $conn=ora_logon("cricketunes@pickles","j8j3kf"); if ($conn != TRUE) die("Unable to connect to oracle, exiting...\n"); $cursor = ora_open($conn); if ($cursor != TRUE) die("Unable to open a cursor, exiting...\n");
3
1855
by: deplexus | last post by:
Hi i have query SELECT * FROM stat WHERE host LIKE "uncp%" AND remotehost NOT REGEXP "looksmart" AND datetime REGEXP '^........17.*'; and it works as have to but when i try to complicate:
3
2029
by: Muhd | last post by:
<usualDisclaimer>Please forgive me if this is in the wrong group, and if so, what is the right group.</usualDisclaimer> Let me start off by first saying im a newb. Ok, with that out of the way I am trying really hard and boy have I learned a lot in the last little while but I have a question i just can't seem to find a good answer to. Lets say i have a table that simply stores how many times someone has logged into a webpage. Is it...
2
1418
by: microsoft | last post by:
I have a very "flat" doc structure like this <root> <one> <two> <three> ... n <=100 </root>
4
4061
by: asdf | last post by:
Hello! Can someone tell me whats wrong with this piece of code: Option Compare Database Option Explicit Sub retrieve() Dim rst As ADODB.Recordset Dim i As Integer
4
3309
by: New Guy | last post by:
keywords like '*..*' I am tryingto set up a filter in access2000 report. and im reading a value from a textbox from a form and trtying to retrieve all the recordsets containing that keyword. I am new to access and im not sure if i can use this. but i surely have wasted enuff time on this. can anyone please help me. thank you. Mohaid mohaid@hotmail.com
3
1920
by: MLH | last post by:
I have a query, qryAppend30DayOld260ies that attempts to append records to tblCorrespondence. When run, it can result in any of the following: appending no records, appending 1 record or appending many records. Two of the target fields in tblCorrespondence receiving values in the append operation are and . For any given VehicleJobID value, I want only ONE record in correspondence table to have an value of "01". This query blindly appends...
28
72494
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and 2005 Test Environments. What is the purpose of a view if I can just copy the vode from a view and put it into a stored procedure? Should I be accessing views from stored procedures?
2
1927
by: Nosferatum | last post by:
This script is meant to limit access by sessions, using username and password from mysql db and redirect users after login according to a given value belonging to each user in the db (10,20,30,40). (the included config is just server settings, the login is just a login form). The script appear to connect but will not redirect users, it seems that even with correct login details, it won't validate.
0
8701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8623
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9185
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8892
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7772
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6539
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4387
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.