473,597 Members | 2,103 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 1082
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
1629
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
3834
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
1853
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
2025
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
1407
by: microsoft | last post by:
I have a very "flat" doc structure like this <root> <one> <two> <three> ... n <=100 </root>
4
4060
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
3306
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
1909
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
72412
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
1925
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
7884
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
8267
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
8380
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...
1
8024
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8258
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...
1
5844
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
3921
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2394
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1229
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.