bases on date .Here id is same. I am new to witting mysql query (learning).
I think this can be done using sub query. any help will be really
appreciated .
Thanks Rg
Mohan L
storage
bases on date .Here id is same. I am new to witting mysql query (learning).
I think this can be done using sub query. any help will be really
appreciated .
Thanks Rg
Mohan L
Hi
Is it possible in MySQL 5.1 to retrieve three columns in a select sub-query
like below :
SELECT student_age, SELECT (student_subjects_id, random_mark, subject FROM
student_subjects ORDER BY RAND(), LIMIT 1)
FROM students
WHERE student_age 10
ORDER BY RAND()
LIMIT 1
I've looked and tried
columns in a select
sub-query
like below :
SELECT student_age, SELECT (student_subjects_id, random_mark, subject FROM
student_subjects ORDER BY RAND(), LIMIT 1)
FROM students
WHERE student_age 10
ORDER BY RAND()
LIMIT 1
I've looked and tried everything, but nothing seems to work
Souza Neto
Tompkins Neil neil.tompk...@googlemail.com escreveu na mensagem
news:aanlkti=djkujcsg=kf29sjsp0yllhmhb02mqzdvzd...@mail.gmail.com...
Hi
Is it possible in MySQL 5.1 to retrieve three columns in a select
sub-query
like below :
SELECT student_age, SELECT (student_subjects_id
query
Hi
Is it possible in MySQL 5.1 to retrieve three columns in a select sub-query
like below :
SELECT student_age, SELECT (student_subjects_id, random_mark, subject FROM
student_subjects ORDER BY RAND(), LIMIT 1)
FROM students
WHERE student_age 10
ORDER BY RAND()
LIMIT 1
I've looked and tried
three columns in a select
sub-query
like below :
SELECT student_age, SELECT (student_subjects_id, random_mark, subject
FROM
student_subjects ORDER BY RAND(), LIMIT 1)
FROM students
WHERE student_age 10
ORDER BY RAND()
LIMIT 1
I've looked and tried everything, but nothing seems
: Tompkins Neil [mailto:neil.tompk...@googlemail.com]
Sent: Wednesday, August 25, 2010 1:23 PM
To: [MySQL]
Subject: Retrieve three columns in sub query
Hi
Is it possible in MySQL 5.1 to retrieve three columns in a select sub-query
like below :
SELECT student_age, SELECT
select_type: SIMPLE
table: prod
type: ref
possible_keys: prod_pub_prod_id,pub_id,pub_id_2
key: pub_id
key_len: 48
ref: const
rows: 1543
Extra: Using where
=== Outer Query with Sub-query ===
us-gii EXPLAIN
- SELECT prod_num FROM
-Original Message-
From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De
Meersman
Sent: Thursday, June 03, 2010 6:52 AM
To: je...@gii.co.jp
Cc: mysql@lists.mysql.com
Subject: Re: Slow when using sub-query
The short answer is that the optimizer is amazingly stupid
*hi*
*
*
*i have a reporting query which have 2 long sub-query*
SELECT r1.code_centre, r1.libelle_centre, r1.id_equipe, r1.equipe,
r1.id_file_attente,
r1.libelle_file_attente,r1.id_date, r1.tranche,
r1.id_granularite_de_periode,r1.granularite,
r1.ContactsTraites, r1.ContactsenParcage, r1
On Wed, Jun 2, 2010 at 10:28 AM, Lin Chun franks1...@gmail.com wrote:
*don't know it very clear, but i think is the problem of derived seems it
take full scaning*
Yes, it has no indexes so it isn't good for very large subqueries.
You should create them as temporary tables instead and give them
select_type: SIMPLE
table: prod
type: ref
possible_keys: prod_pub_prod_id,pub_id,pub_id_2
key: pub_id
key_len: 48
ref: const
rows: 1543
Extra: Using where
=== Outer Query with Sub-query ===
us-gii EXPLAIN
- SELECT prod_num FROM prod
sangprabv wrote:
I have these query:
SELECT SUM(price)*0.5 AS price1 FROM table WHERE partner = 'A';
SELECT SUM(price)*0.65 AS price2 FROM table WHERE partner = 'B';
Is it possible to make the queries into 1 single query? How to make it
happen? Many thanks for helps.
Willy
You can
Many thanks for the query. It works ;)
Willy
On Fri, 2009-09-04 at 08:09 +0200, Wolfgang Schaefer wrote:
sangprabv wrote:
I have these query:
SELECT SUM(price)*0.5 AS price1 FROM table WHERE partner = 'A';
SELECT SUM(price)*0.65 AS price2 FROM table WHERE partner = 'B';
Is it
Many thanks for your query, seems we need to group it like Wolfgang's
does.
Willy
On Thu, 2009-09-03 at 22:33 -0700, Manasi Save wrote:
may be you can use IN clause:
SELECT SUM(price)*0.5 AS price1, SUM(price)*0.65 AS price2 FROM table
WHERE partner IN ('A', 'B');
--
MySQL General
I have these query:
SELECT SUM(price)*0.5 AS price1 FROM table WHERE partner = 'A';
SELECT SUM(price)*0.65 AS price2 FROM table WHERE partner = 'B';
Is it possible to make the queries into 1 single query? How to make it
happen? Many thanks for helps.
Willy
--
MySQL General Mailing List
For
It's not clear what exactly you are looking for. Two possible solutions:
1) use a union
2) use a join with another table containing partner and factor fields.
Can you give a short example of what the input looks like and what you
would like the output to look like?
Regards,
- Robert
On Thu,
What I'm looking for is to SUM the price from partner A and B with each
result. So the result I expect is like Partner A total's price 123,
Partner B total's price 456. Can you give me the query example? TIA.
Willy
On Thu, 2009-09-03 at 23:11 -0400, Robert Citek wrote:
It's not clear what
Because these are two quite distinct queries, I don't see an immediate way of
joining them that would make them more efficient. Something that comes to mind
are sub-select statements for example, but that would make this more complex
than it needs to be.
Like Robert said, you aren't giving us
may be you can use IN clause:
SELECT SUM(price)*0.5 AS price1, SUM(price)*0.65 AS price2 FROM table
WHERE partner IN ('A', 'B');
--
Thanks and Regards,
Manasi Save
Artificial Machines Pvt Ltd.
I have these query:
SELECT SUM(price)*0.5 AS price1 FROM table WHERE partner = 'A';
SELECT
On Fri, Jun 19, 2009 at 11:27 AM, Brent Baisleybrentt...@gmail.com wrote:
It sounds like you want to use spatial indexes, but they only became
available in v4.1
http://dev.mysql.com/doc/refman/5.0/en/create-index.html
http://dev.mysql.com/doc/refman/5.0/en/using-a-spatial-index.html
That
In the last episode (Jun 18), Matt Neimeyer said:
I'm converting a PHP app from using Visual FoxPro as the database backend
to using MySQL as the backend. I'm testing on MySQL 4.1.22 on Mac OSX
10.4. The end application will be deployed cross platform and to both 4.x
and 5.x MySQL servers.
SELECT zip FROM zipcodes WHERE
degrees(acos(sin(radians(39.0788994))*sin(radians(latitude))+
cos(radians(39.0788994))*cos(radians(latitude))*cos(radians(-77.1227036-longitude*60*1.1515
5
Ouch. You might want to calculate the rectange enclosing your target
distance, add an index on lat
instantly.
I'm at a complete loss... The suggestions I've seen online for
optimizing Dependent Subquery's basically revolve around changing it
from a sub-query to a join but that would require more
re-architecturing than I want to do... (Unless I'm forced) Especially
since more than a few of those
at a complete loss... The suggestions I've seen online for
optimizing Dependent Subquery's basically revolve around changing it
from a sub-query to a join but that would require more
re-architecturing than I want to do... (Unless I'm forced) Especially
since more than a few of those solutions suggested
Peter,
On Thu, Jun 18, 2009 at 9:27 PM, Peter
Brawleypeter.braw...@earthlink.net wrote:
For explanation alternatives see The unbearable slowness of IN() at
http://localhost/artful/infotree/queries.php.
you prolly meant to not post a url pointing at your local copy of your
website. This works
for
optimizing Dependent Subquery's basically revolve around changing it
from a sub-query to a join but that would require more
re-architecturing than I want to do... (Unless I'm forced) Especially
since more than a few of those solutions suggested precalculating the
distance between zipcodes which
it
from a sub-query to a join but that would require more
re-architecturing than I want to do... (Unless I'm forced) Especially
since more than a few of those solutions suggested precalculating the
distance between zipcodes which only works if the distances are known
(only allow 10, 50 and 100 mile
Dear All,
I am interested in performing a sub query that removes duplicate records from
a temporary table prior to pushing the data to the main table.
I am not sure if it is possible and thought I would ask prior to the endeavor.
I currently use php to perform this operation but is really bogs
.
This runs flawlessly in EMS SQL MANAGER and produces what I want. But of
course when I try to use it as a query in my PHP as the select statement, it
bombs. I think the answer is to create a sub query, but I can't seem to find
a good example on the web anywhere. Maybe I am just not using the right
: Wednesday, May 16, 2007 7:25 PM
Subject: Sub query help
MySQL Version 5.0.22
I would be thrilled if someone could even just point me to a site that
provided good examples of using sub queries. I have the following query:
SELECT
participants.store_id,
completed_modules.module_id,
AVG
Brian,
I think the answer is to create a sub query,
Without your tables I can't test this transcription, but the trick is
straightforward: if the first query includes the column(s) required to
join it correctly to the 2nd query, replace the avgscore table reference
in the second query
Chris wrote:
Chris White wrote:
On Monday 07 August 2006 12:13 pm, William DeMasi wrote:
I meant to have it say :
select * from c2iedm_dev2.act where act_id IN (select obj_act_id from
c2iedm_dev2.act_functl_assoc where subj_act_id =24);
What does the output of (the subselect):
select
The select statement I am trying to run is:
select * from c2iedm_dev2.act where act_id =(select obj_act_id from
c2iedm_dev2.act_functl_assoc where subj_act_id =24);
But I get the error below:
You have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for
On Monday 07 August 2006 12:02 pm, William DeMasi wrote:
The select statement I am trying to run is:
select * from c2iedm_dev2.act where act_id =(select obj_act_id from
c2iedm_dev2.act_functl_assoc where subj_act_id =24);
Well the problem I'm seeing is that you're not using IN anywhere in the
On Monday 07 August 2006 12:13 pm, William DeMasi wrote:
I meant to have it say :
select * from c2iedm_dev2.act where act_id IN (select obj_act_id from
c2iedm_dev2.act_functl_assoc where subj_act_id =24);
What does the output of (the subselect):
select obj_act_id
from
Chris White wrote:
On Monday 07 August 2006 12:13 pm, William DeMasi wrote:
I meant to have it say :
select * from c2iedm_dev2.act where act_id IN (select obj_act_id from
c2iedm_dev2.act_functl_assoc where subj_act_id =24);
What does the output of (the subselect):
select obj_act_id
from
Out of interest is there any time on the roadmap to improve the query
optimizer's handling of sub-queries as specified in
http://dev.mysql.com/doc/refman/5.0/en/subquery-restrictions.html ?
Thanks.
On Sat, May 06, 2006 at 12:55:55PM +0100, Peter Rosenthal wrote:
Out of interest is there any time on the roadmap to improve the query
optimizer's handling of sub-queries as specified in
http://dev.mysql.com/doc/refman/5.0/en/subquery-restrictions.html ?
As Timour previewed at his Speeding Up
of the current
primary key field top a sub query !
Read my latest post if i can get around not using variables, and
still
manage to get the right values of a current row going to a sub query
?
On 29/12/2005, at 2:48 AM, [EMAIL PROTECTED] wrote:
You seem to be coming at SQL with a COBOL
Dan Rossi [EMAIL PROTECTED] wrote on 12/29/2005 07:19:13 AM:
Thanks for your kind words of opinion, if you feel you have a better
way please do go ahead , i am going to show you the sql i ended up
using which was a union to append the current summary at the end, i
then had to use php
not a working query, and im not asking for
someone to fix it, however as u can see i need to send the customerID
and month to the sub query. What its actually trying to do is tedious
to explain, but i have two tables of media usage for a customer, the
current month will be in the usage table, so
not a working query, and im not asking for
someone to fix it, however as u can see i need to send the customerID
and month to the sub query. What its actually trying to do is tedious
to explain, but i have two tables of media usage for a customer, the
current month will be in the usage table, so
Btwi dont want the column of a view to be a variable, i think thats
what it thinks ! Im just needing to send the value of the current
primary key field top a sub query !
Read my latest post if i can get around not using variables, and still
manage to get the right values of a current row
the column of a view to be a variable, i think thats
what it thinks ! Im just needing to send the value of the current
primary key field top a sub query !
Read my latest post if i can get around not using variables, and still
manage to get the right values of a current row going to a sub query
instead of making
variables but it didnt even let me do this
snip
On 29/12/2005, at 3:31 PM, Dan Rossi wrote:
Btwi dont want the column of a view to be a variable, i think thats
what it thinks ! Im just needing to send the value of the current
primary key field top a sub query
Hi there i am trying to use usewr variables in a select statement to
add to a where clause in a sub query. Ie
select @id:=id,@month:=month, (select SUM(totals) from table where
[EMAIL PROTECTED] and [EMAIL PROTECTED]) as totals from table
its happened on other occasions ie with calculations
Dan Rossi [EMAIL PROTECTED] wrote on 12/27/2005 11:39:57 PM:
Hi there i am trying to use usewr variables in a select statement to
add to a where clause in a sub query. Ie
select @id:=id,@month:=month, (select SUM(totals) from table where
[EMAIL PROTECTED] and [EMAIL PROTECTED]) as totals
to the sub query. What its actually trying to do is tedious
to explain, but i have two tables of media usage for a customer, the
current month will be in the usage table, so that if the plan changes
in that month so does the totals, but for the previous months there is
a static month_totals table
Hi
Could anyone help perhaps tell me why the following
simple query containing a sub-query gives a syntax
error.
select 1 from messages
where not exists ( select 1 from
message_push_notifications
where message_id =
messages.id)
Thanx
Herman
Herman Scheepers [EMAIL PROTECTED] wrote on 11/13/2005 11:53:23 AM:
Hi
Could anyone help perhaps tell me why the following
simple query containing a sub-query gives a syntax
error.
select 1 from messages
where not exists ( select 1 from
message_push_notifications
Scheepers [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Sunday, November 13, 2005 11:53 AM
Subject: Sub Query
Hi
Could anyone help perhaps tell me why the following
simple query containing a sub-query gives a syntax
error.
select 1 from messages
where not exists ( select 1 from
anyone help perhaps tell me why the following
simple query containing a sub-query gives a syntax
error.
select 1 from messages
where not exists ( select 1 from
message_push_notifications
where message_id =
messages.id)
Thanx
Herman
I rerezad you and discovered that (BrgId, Kode) is UNIQUE.
your query will return no rows :o)
spending 54813 ms for nothing.
Mathias
Selon [EMAIL PROTECTED]:
Hi,
You may have the same table structure in MS, but not the same table definiton
:
constraints+indexes+stats !
try :
create
hi,
don't listen to last email.
since the two first rows are unique, you can't use my example.
Just create an index as i said, and play your query :
Select BrgId, Kode, Barang From Barang Where Barang in
(Select Barang From Barang Group By Barang Having Count(*) 1 )
Mathias
Selon [EMAIL
Hi Mathias,
Thanks for your suggestion, but i run this query to find multiple
records with the same name in field barang (double records). And the
results i found 94 rows at 54813 ms. I try your idea and the result is
the same. So i think mysql not optimized for this kind sub query.
Do you
is
the same. So i think mysql not optimized for this kind sub query.
Do you have any other suggestion?
hendro
[EMAIL PROTECTED] wrote:
hi,
don't listen to last email.
since the two first rows are unique, you can't use my example.
Just create an index as i said, and play your query
[EMAIL PROTECTED] wrote:
My suggestion: Don't use a subquery, use a temp table (
http://dev.mysql.com/doc/mysql/en/rewriting-subqueries.html)
CREATE TEMPORARY TABLE tmpDupes (KEY (`Barang`))
SELECT `Barang`
FROM Barang
GROUP BY Barang
HAVING count(1) 1;
Select b.`BrgId`, b.`Kode`, b.`Barang`
Thanks Peter - you gave me some ideas...
here is what I have so far (simplified for simplification..)
select t2.dt_aud_rec, t1.id_secr_rqst from isr2_aud_log t1, isr2_aud_log t2
where t1.id_secr_rqst=t2.id_secr_rqst
and t1.dt_aud_rec t2.dt_aud_rec
group by t1.id_secr_rqst
but the problem is
Anoop kumar V [EMAIL PROTECTED] wrote on 05/24/2005 03:02:11 PM:
Thanks Peter - you gave me some ideas...
here is what I have so far (simplified for simplification..)
select t2.dt_aud_rec, t1.id_secr_rqst from isr2_aud_log t1, isr2_aud_log
t2
where t1.id_secr_rqst=t2.id_secr_rqst
and
My profound apologies
here is the table create structure.
the biggest problem i think is that this table does not have any primary
keys or atleast unique columns: (I think joins require unique columns)
mysql show create table isr2_aud_log\G
*** 1. row
Hi,
I have 8414 records in table name Barang, I run query like this :
Select BrgId, Kode, Barang From Barang Where Barang in
(Select Barang From Barang Group By Barang Having Count(*) 1 )
and the answer took 54813 ms. I think is too long. I ran the same query
against same table in MS SQL
Hi,
You may have the same table structure in MS, but not the same table definiton :
constraints+indexes+stats !
try :
create index toto on Barang(BrgId, Kode, Barang);
Select BrgId, Kode, Barang From Barang
Group By Barang
Having Count(*) 1 ;
Mathias
Selon Hendro Suryawan [EMAIL
hi All,
I need to create a query using no subqueries as I use 4.0.23 which does not
support subqueries. I cannot upgrade for some compellimg reasons (the
product does not support anything later than 4.0.23nt as of now). I also
cannot use any thing that is native to mysql - in the sense that
Hi Anoop
Try:
SELECT t1.id_secr_rqst, t2.name_rec_type, t1.dt_aud_rec
FROM isr2_aud_log t1, isr2_aud_log t2
WHERE t1.id_secr_rqst =
t2.id_secr_rqst AND
t1.name_rec_type='Exception Resource'
ORDER by t1.dt_aud_rec DESC
LIMIT 2;
Peter Normann
--
MySQL General Mailing List
For list archives:
Thanks Peter - but I see two issues:
1. It returns data about only one id_secr_rqst - I want it to return data
about every id_secr_rqst in the table.
2. Limit IMO is mysql specific (I hope I am wrong) is there something
generic so I dont need to bother about which database I am running it
Anoop kumar V mailto:[EMAIL PROTECTED] wrote:
1. It returns data about only one id_secr_rqst - I want it to return
data about every id_secr_rqst in the table.
So, if I understand you correctly (sorry, having a bad day), you want all
records for the past two days?
Assuming this, you could use
Anoop kumar V mailto:[EMAIL PROTECTED] wrote:
well - actually it might not be the last 2 days - i just want 2 of
the latest records for every task regardless of what date it is in
the table.
Okay, now I think I understand what you need - and if I am correct, this
looks like one of the more
On May 19, 2005, at 12:51 AM, Dan Rossi wrote:
Hi there, I am having issues with this funny error message. I am
trying to do a sub query and then a group by clause on a date.
However i keep getting this annoying message for some reason.
Happens via terminal aswell as my sql gui. Here
Hi there, I am having issues with this funny error message. I am trying
to do a sub query and then a group by clause on a date. However i keep
getting this annoying message for some reason. Happens via terminal
aswell as my sql gui. Here is the query I am trying to do
select (select count
Hi there, I was wondering if its possible to be able to send a field
from the outer table to be used as the where statement for the sub
query ?
something like this
select somefield from table 1, (select count(*) from table2 inner join
table1 using somekey where table1.key=somefield) as alias
I have worked out, to send that field to the where query, i have to select
the outer table again !!
i dont think this is very efficient ?
select * from complaints, (SELECT IF (count(*) 1,Yes,No) AS count
FROM complainant ccINNER JOIN complaints c ON cc.complainantID=c.complainantID
WHERE
to fix the problem,
but I can't just change that overall query: remember, this is in a
report generator, and arguably a simple one at that. I have to fit
everything I need to do into the column sub queries. Is this possible?
Is there any way to modify the sub query so that it will include all
[EMAIL PROTECTED] wrote:
SELECT DISTINCT i.basename
FROM inventory i
INNER JOIN transaction t
ON i.prodcode = t.prodcode
AND t.date = '2004-01-01'
AND t.date = '2004-01-31'
INNER JOIN transaction tt
ON i.prodcode = tt.prodcode
AND tt.date = '2005-01-01'
sam wun [EMAIL PROTECTED] wrote on 01/20/2005 11:45:40 AM:
[EMAIL PROTECTED] wrote:
SELECT DISTINCT i.basename
FROM inventory i
INNER JOIN transaction t
ON i.prodcode = t.prodcode
AND t.date = '2004-01-01'
AND t.date = '2004-01-31'
INNER JOIN
Hi list,
The following sql statement takes 3 mintues to complete the query. How
can I improve its speed?
select DISTINCT i.basename from inventory i, transaction t, customer c
where i.prodcode = t.prodcode and c.custcode = t.custcode and i.basename
is not NULL and i.prodname is not NULL and
Sam,
Can you send the output of the following:
#explain your query\G
Clint
From: sam wun [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: sub query is extermely slow
Date: Wed, 19 Jan 2005 20:02:37 +0800
Hi list,
The following sql statement takes 3 mintues to complete the query. How can
I
From: sam wun [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: sub query is extermely slow
Date: Wed, 19 Jan 2005 20:02:37 +0800
Hi list,
The following sql statement takes 3 mintues to complete the query.
How can I improve its speed?
select DISTINCT i.basename from inventory i, transaction t
'%buffer%';:
Clint
From: sam wun [EMAIL PROTECTED]
To: Clint Edwards [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: sub query is extermely slow
Date: Wed, 19 Jan 2005 20:39:41 +0800
Clint Edwards wrote:
Sam,
Can you send the output of the following:
#explain your query\G
Thanks
]
To: Clint Edwards [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: sub query is extermely slow
Date: Wed, 19 Jan 2005 22:05:58 +0800
Clint Edwards wrote:
Sam,
Can you send the following information:
When was the last time 'analyze table table_name' (inventory,
transaction, customer
index to a field after a table is created?
Thanks
Sam
Clint
From: sam wun [EMAIL PROTECTED]
To: Clint Edwards [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: sub query is extermely slow
Date: Wed, 19 Jan 2005 22:05:58 +0800
Clint Edwards wrote:
Sam,
Can you send the following information
Check ALTER statement in MySQL doc. It explains how to add/modify an index
after a table has been created.
-Original Message-
From: sam wun [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 19, 2005 10:00 AM
Cc: mysql@lists.mysql.com
Subject: Re: sub query is extermely slow
sam wun [EMAIL PROTECTED] wrote on 01/19/2005 07:02:37 AM:
Hi list,
The following sql statement takes 3 mintues to complete the query. How
can I improve its speed?
select DISTINCT i.basename from inventory i, transaction t, customer c
where i.prodcode = t.prodcode and c.custcode =
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 19 January 2005 15:04
To: sam wun
Cc: mysql@lists.mysql.com
Subject: Re: sub query is extermely slow
sam wun [EMAIL PROTECTED] wrote on 01/19/2005 07:02:37 AM:
Hi list,
The following sql statement
[EMAIL PROTECTED] wrote:
I would simplify it by converting everything to us explicit (not
implicit) JOIN statements,skipping unnecessary type conversions, and
logically merging your conditions. Here is your original query,
slightly reformatted.
SELECT DISTINCT i.basename
FROM inventory i,
Oooo...Oo. thank you very much for you
information.
I better migrate my database to postgres.
I'll use MySQL back after MySQL 4.1 stable version
released on SuSE Distro.
--- Jigal van Hemert [EMAIL PROTECTED] wrote:
I don#t understand why subquery on my MySQL
4.0.18-Mas
does not valid.
Dear my friends...
I don#t understand why subquery on my MySQL 4.0.18-Mas
does not valid.
Here what I have done.
[EMAIL PROTECTED]:~ mysql -h 192.168.23.1 -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or
\g.
Your MySQL connection id is 354744 to server version:
I don#t understand why subquery on my MySQL 4.0.18-Mas
does not valid.
Simple reason: v. 4.0.18 does not support subqueries yet. Use 4.1 or later.
Regards, Jigal.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL
Jigal van Hemert wrote:
I don#t understand why subquery on my MySQL 4.0.18-Mas
does not valid.
select * from salesreport where custid in
(select custid from appointment where done='N');
Simple reason: v. 4.0.18 does not support subqueries yet. Use 4.1 or later.
Regards, Jigal.
Or, rewrite the
Also interested in answer to this one.
Terry Riley
--Original Message-
Hi List,
When can we expect limits in sub-queries? I am currently on 4.1.0.
1235 - This version of MySQL doesn't yet support 'LIMIT
IN/ALL/ANY/SOME
subquery'
Query:
--
MySQL General
Hi List,
When can we expect limits in sub-queries? I am currently on 4.1.0.
1235 - This version of MySQL doesn't yet support 'LIMIT IN/ALL/ANY/SOME
subquery'
Query:
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL
the rows of the UNION sub-query there.. the reason
I used it as sub-query is that I want to count the rows, and then use:
SELECT FOUND_ROWS();
to get the number of rows supposed to be retuned without using the LIMIT..
Is all above correct?
First of all your subqueries are illegal, because you
Since I don't use MySQL 4.1, is this query OK?
SELECT SQL_CALC_FOUND_ROWS * FROM
((SELECT * FROM t1 WHERE id100 GROUP BY country)
UNION ALL
(SELECT * FROM t2 WHERE id150 GROUP BY country)
LIMIT 0,10);
I want this to return all the rows of the UNION sub-query
Hi there,
I'm using MySQL 4.0.15 on RedHat 9.0.
I've got problem for which I can't figure out how to do it efficiently
without using a subquery. 4.1.0 isn't really an option since this is going
into a stable environment.
The table is like this.
+--+--++
| revision | id |
Lo all,
What's the format for a sub query in MySQL??
I've tried the below with a few variants but I can't seem to get it
sorted...
SELECT songlist.ID AS ID,
songlist.duration AS Duration,
songlist.artist AS Artist,
songlist.title AS Title,
songlist.filename
Chris Knipe wrote:
Lo all,
What's the format for a sub query in MySQL??
I've tried the below with a few variants but I can't seem to get it
sorted...
SELECT songlist.ID AS ID,
songlist.duration AS Duration,
songlist.artist AS Artist,
songlist.title AS Title
Good Morning everyone:
I need help figuring out what is wrong with this query. I have tried to
use the LEFT JOIN, but it doesn't solve the purpose.
This is what I am trying to run:
SELECT group_id,name,'SELECTED' FROM groups WHERE group_id = (SELECT
group_id FROM user_groups WHERE
:
SELECT
group_id,
name,
IF(1=userid,'SELECTED',' ')
FROM groups
ORDER BY group_id
Chris
-Original Message-
From: Geeta Rajaraman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 7:03 AM
To: [EMAIL PROTECTED]
Subject: MySQL sub
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 10:00 AM
To: Chris
Subject: Re: MySQL sub-query error.
See..I changed it = only coz the IN wouldn't work. I am guessing its a MySQL
version issue. I am using a version below 4.0.
I am curious about the second version of my query you
1 - 100 of 116 matches
Mail list logo