I was wondering if any one could point out potential problems with the
following query or if there was a better alternative
From a list of users I want to return all who don't have all the specified
user_profile options or those who do not have at least one preference set to
1. The following
DELETE from cart
WHERE product_id NOT IN( SELECT id FROM products where status = 'enabled')
AND user_id = '90'
The above is what I would like it to do, though I can not test it as I do
not have access to a mysql that supports it.
Aside from two queries, can someone perhaps show me how to run
DELETE from cart
WHERE product_id NOT IN( SELECT id FROM products where status = 'enabled')
AND user_id = '90'
The above is what I would like it to do, though I can not test it as I do
not have access to a mysql that supports it.
Aside from two queries, can someone perhaps show me how
the where portion of the command correctly (though I
have tried every possible wrapping with single-quotes that I could come
up with) OR are sub-queries simply not supported OR is there something
else that I should know.
Any help you can give me would be way appreciated.
Henry Dall
[EMAIL
getting MySqlDump to use sub-queries
I am having a problem using MySqlDump. Context: I am having
to export some very specific records from our database
We have a table called BIN which has, amongst others, an ID
column and an ACCOUNT_ID column. When I use this
mysqldump -u
Hello.
Please can you send the complete query and table definition, because
I was unable to reproduce this weird behavior. What version of MySQL do
you use? What client do you use to execute queries? We can see below,
that there is no period before total_bandwidth:
mysql select (SELECT
Hi there somehow my AS field alias of a sub query is adding a dot at
the start therefore I cant use it in my application.
(SELECT SUM(feed_usage.bandwidth) AS bandwidth FROM feed_usage WHERE
customerID IN (57) AND
DATE_FORMAT(feed_usage.stats_date,'%m%Y')=DATE_FORMAT(NOW(),'%m%Y') )
AS
Hi
apologies if this is a dumb question but can you do subqueries in mysql?
select count(*) as RES from ACL_USER_GROUP_ROLE as UGR where UGR.USER_ID
=2 and UGR.ROLE_ID = (select ROLE_ID from ACL_ROLE where ROLE_NAME =
'projectmanager' )
this query fails, but the individual queries work fine
Nathan Coast wrote:
Hi
apologies if this is a dumb question but can you do subqueries in mysql?
select count(*) as RES from ACL_USER_GROUP_ROLE as UGR where UGR.USER_ID
=2 and UGR.ROLE_ID = (select ROLE_ID from ACL_ROLE where ROLE_NAME =
'projectmanager' )
this query fails, but the
Hi Nathan,
Subqueries are only available in MySQL as of version 4.1.
On Fri, 29 Oct 2004, Nathan Coast wrote:
Hi
apologies if this is a dumb question but can you do subqueries in mysql?
select count(*) as RES from ACL_USER_GROUP_ROLE as UGR where UGR.USER_ID
=2 and UGR.ROLE_ID = (select
Hi there, I have Mysql 4.1 on my development machine, I have been
trying to test out if I am going to be able to do this. What I would
like to do is return a one to many resultset but without the duplicated
results in the first query. Hows is this going to be possible ? I would
like to get all
- Original Message -
From: electroteque [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 28, 2004 6:33 PM
Subject: Sub queries
Hi there, I have Mysql 4.1 on my development machine, I have been
trying to test out if I am going to be able to do this. What I would
like
electroteque wrote:
Also I am trying to push for 4.1 to be installed on the servers i
build web apps on. When will be a possible date to say that gamma
which is practically production quality, to actually say production
quality ? heheh. Our systems guy will only trust it if it says that,
god
The keyword UNION should ensure that all duplicate rows are removed
from the combined result set. If you use UNION ALL instead of UNION,
the duplicates are left in the result set.
Yeh right, funny, early versions of 4.0, UNION had in the docs this was
only avail in 4.1, i am so sure i read
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 28, 2004 9:26 PM
Subject: Re: Sub queries
The keyword UNION should ensure that all duplicate rows are removed
from the combined result set. If you use UNION ALL instead of UNION
There are obviously many possible variations of your query; I just
stated one that was pretty close to your original query. It's really
not clear to me yet what you were trying to do so I just wanted to show
you typical syntax.
Ok sorry ppl I should have given a typical example in my
I have MYSQL 3.23.32 on a Cobalt 550 platform. I see from the FAQ's that sub
queries will not work on MYSQL 4.1. Is there a way to use JOIN statements
instead or do these fail too.
eg: SELECT some_ID from someTable NOT IN (Select some_ID from ANOTHERTABLE)
Or do I have to redesign my website
James Raff wrote:
I have MYSQL 3.23.32 on a Cobalt 550 platform. I see from the FAQ's that sub
That's a *very* old version. The latest 3.23 is 3.23.58. The current
production release is 4.0.20. You should consider upgrading.
queries will not work on MYSQL 4.1. Is there a way to use JOIN
hello every one,
i am in the process of converting my database from access to mysql ... now tat
i have started working with mysql i have realized that my subqueries wont work
here ... i read the article on how to handle some of the simple subqueries with
joins ... my subquery is as follow and i
Sandeep N Seshadri wrote:
hello every one,
i am in the process of converting my database from access to mysql ... now tat
i have started working with mysql i have realized that my subqueries wont work
here ... i read the article on how to handle some of the simple subqueries with
joins ... my
Could you please tell me more about the pass through queries. i dont have an
idea abt it
sandeep
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Sandeep N Seshadri wrote:
Could you please tell me more about the pass through queries. i dont have an
idea abt it
sandeep
Sure.
Create a new query in Access.
Instead of adding tables to the query design view like normal, simply
click the 'query' menu, and select 'SQL Specific', and then
* Jasper Bijl
Is there a way to do something like subqueries in one query?
Yes, JOIN can be used in many cases where you would think you need
sub-queries. A JOIN is also generally faster, according to:
URL: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html
I have a customer table (Klant
Hello,
Is there a way to do something like subqueries in one query?
I have a customer table (Klant) with contacts (KlantKontakt) and a
address (Adres) table.
The address table keeps a record of each different address for a
customer including old addresses (to maintain history).
If I want to
PROTECTED]
Sent: woensdag 13 augustus 2003 13:40
To: [EMAIL PROTECTED]
Cc: Jasper Bijl
Subject: Re: sub queries in mysql?
* Jasper Bijl
Is there a way to do something like subqueries in one query?
Yes, JOIN can be used in many cases where you would think you
need sub-queries. A JOIN
what the query does, I'll appreciate it allot. It may help
me understand the basic logic behind the structure of the query, and
aid me in the future when I may need to execute such queries again
(although, I'm honestly hoping that when such a time comes, MySQL
will support sub-queries).
Okay
Lo all,
are sub-queries supported on mysql-max 3.23.49 ??
If they are, what's wrong with the following statement?
SELECT monitorhosts.HostID
FROM monitorhosts
WHERE monitorhosts.HostID NOT IN
(SELECT HostID
FROM monitorhostgroupdetails
WHERE
I'm sorry to disappoint you, but subqueries are NOT supported int any MySQL
version, yet.
You can read the MySQL manual about it. You can find there when and how it
will be implemented.
Bye
Daniel
At 21:39 2002.06.06. +0200, you wrote:
Lo all,
are sub-queries supported on mysql-max
Dániel [EMAIL PROTECTED]
To: Chris Knipe [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, June 06, 2002 9:47 PM
Subject: Re: sub-queries
I'm sorry to disappoint you, but subqueries are NOT supported int any
MySQL
version, yet.
You can read the MySQL manual about it. You can find there when
SELECT monitorhosts.HostID
FROM monitorhosts, monitorhostgroupdetails
WHERE monitorhosts.HostID = monitorhostgroupdetails.HostID
AND monitorhostgroupdetails.HostGroupID != '1');
Gruss
Sabine
Chris Knipe wrote:
Lo all,
are sub-queries supported on mysql-max 3.23.49
-
From: Chris Knipe [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 2:52 PM
To: [EMAIL PROTECTED]
Subject: Re: sub-queries
Fair enough (and also what I thought)
Does anyone have any idea how I can implement the below in a similar
fashion then?
I have a list of items, and a list
Subject: Re: sub-queries
SELECT monitorhosts.HostID
FROM monitorhosts, monitorhostgroupdetails
WHERE monitorhosts.HostID = monitorhostgroupdetails.HostID
AND monitorhostgroupdetails.HostGroupID != '1');
Gruss
Sabine
Chris Knipe wrote:
Lo all,
are sub-queries supported on mysql-max
to have to use PHP arrays and compare
arrays with hundreds of thousands of values in them?? *deep sigh*
- Original Message -
From: Chris Knipe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 06, 2002 10:16 PM
Subject: Re: sub-queries
*MWAH*!!!
Thanks a million
:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:52 PM
To: [EMAIL PROTECTED]
Subject: Re: sub-queries
Ok, I spoke to soon... And this is starting to drive me up
the walls now...
i.e. getting REALLY irritating and frustrating.
mysql DESCRIBE monitorhosts
- Original Message -
From: Kevin Fries [EMAIL PROTECTED]
To: 'Chris Knipe' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 12:38 AM
Subject: RE: sub-queries
Chris,
sounds like you're looking for an exclusive left outer join.
You want to see records from
Hi.
On Fri 2002-06-07 at 01:55:18 +0200, [EMAIL PROTECTED] wrote:
[...]
Chris,
sounds like you're looking for an exclusive left outer join.
You want to see records from monitorhosts, where there is no corresponding
record
in monitorhostgroupdetails, right?
Yes - and no. If a
also have to admit... It was pointed out to me about two days ago that I
would need to execute this query with a LEFT JOIN. Coming from a MSSQL
background, and being used to simply using sub-queries, I did go and read
the section in the manual about LEFT / RIGHT JOIN statements. After reading
about
Does anyone know the ETA for MySql having
sub queries capabilities?
Rolando
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com
Hi.
With MySQL, there is not (yet) a way to do this with a single
command. A poor SQL work-around is possible, but a bit bloated.
On the other hand, ta.f1 is a redundand field (regarding tb.af1) and
therefore you normally would seldom need a command such as the one
below.
One (quite probably
Hi all,
I am new in mysql and want to analyse between some popular databases. I have
a SQL:
update ta set f1 = ( select af1 from tb where ta.id = tb.id );
It can be done in postgreSQL and Oracle. How can I do the same tasks in
MySQL without using Perl? Is it possible to do this tasks just
At the moment, according to the doc:
http://www.mysql.com/documentation/mysql/bychapter/manual_Introduction.html#
Missing_Sub-selects
MySQL only support the insert select and Replace Select.
I am not sure if that answer your question as I am not a big guru on it
either, but it is a place to
To: Yen
Cc: [EMAIL PROTECTED]
Subject: Re: Does MySQL support sub queries ?
On Fri, Apr 13, 2001 at 04:02:31PM +0800, Yen wrote:
Does anyone know whether this MySQL support sub queries?
Anyone who has checked the MySQL Manual does.
(Hint: http://www.mysql.com/doc/M/i/Missing_Sub
Thank you Jeremy, these really help!! I can't find the manual :D
-Original Message-
From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 13, 2001 4:00 PM
To: Yen
Cc: [EMAIL PROTECTED]
Subject: Re: Does MySQL support sub queries ?
On Fri, Apr 13, 2001 at 04:02:31PM +0800
Well I have managed to rewrite alot of my coding from MS SQL in a downward
and more portable style using MySQL and ASP. I too have now hit apon where
I need to have Sub queries on some basic searching of products. Rather than
just telling people "the manual says..." that Sub Selects a
Hi,
Does anyone know whether this MySQL support sub queries?
such as:
select ref from tool1
where detail = 'xxx'
and ref in
(select ref from tool1
where detail='yyy');
No matter it's within the same table or different table. However below is
the error I've got, anyone can help?
ERROR 1064
On Fri, Apr 13, 2001 at 04:02:31PM +0800, Yen wrote:
Does anyone know whether this MySQL support sub queries?
Anyone who has checked the MySQL Manual does.
(Hint: http://www.mysql.com/doc/M/i/Missing_Sub-selects.html)
Jeremy
--
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo
,
Is there any kind of schedule that says when the next MySQL version will be
available? I'd like to utilize MySQL here, but I can't really start to seriously
work on it until sub-queries are possible.
Thanks!
Mark
-
Before
working with. It'll take me a day or two to get it to that
point again. If you're still willing to help, I'll be happy to do
it and post it to the group.
Thanks!
Mark
PS. Here's the Access SQL querie that I have to convert...
Sorry, but the query you quoted doesn't use sub-queries, does
Hi all,
Is there any kind of schedule that says when the next MySQL version will be available?
I'd like to utilize MySQL here, but I can't really start to seriously work on it
until sub-queries are possible.
Thanks!
Mark
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 1:00 PM
To: [EMAIL PROTECTED]
Subject: sub queries
Hi all,
Is there any kind of schedule that says when the next MySQL version will be
available? I'd like to utilize MySQL here, but I can't really start to
seriously work on it until sub
50 matches
Mail list logo