y for num_of_day); expecting the
output: certain_day, pigId;from certain_day, pigId'weight increasing
continuously for num_of_day. How to select the records in one sql
statement?
thanks
I've thought about this a bit (since your question appeared on the list)
and I break dow
from certain_day, pigId'weight increasing
continuously for num_of_day. How to select the records in one sql
statement?
thanks
I had the following fields for my calendar:
start_date = "08/01/09" (starts on)
end_date = "08/31/09" (ends on)
the_length = "1" (everyday)
repeat_every = "2" (with an interval of 2 days)
Now, I want to use SQL statement to populate
hi,
According to the transfer limit, ... 16M?
2009/3/20 raid fifa :
> Hi guys,
>
> Anybody knows that how many bytes the max length of on SQL statement can be
> in MySQL database?
> I know it's 64KB i
Hi guys,
Anybody knows that how many bytes the max length of on SQL statement can be in
MySQL database?
I know it's 64KB in Oracle.
Thanks.
*^_^*
___
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
gt; > browse_nodes_to_products.browse_node_id is defined as an INDEX so it's
> > indexed.
> > browse_nodes.amazon_id is defined as an INDEX so it's indexed.
> >
> > See http://pastebin.com/m46cced58
> > It has complete table structures, row counts and EX
e table structures, row counts and EXPLAIN output of the SQL
> statement I'm trying to optimize.
>
> I don't think I understand your question regarding carrying the product_id
> through the relationship. This is a many to many relationship. A browse_node
> can contain many
n INDEX so it's indexed.
See http://pastebin.com/m46cced58
It has complete table structures, row counts and EXPLAIN output of the
SQL statement I'm trying to optimize.
I don't think I understand your question regarding carrying the
product_id through the relationship. This is a
content contained within this transmission.
> From: [EMAIL PROTECTED]
> To: mysql@lists.mysql.com
> Subject: Speed up slow SQL statement.
> Date: Fri, 26 Sep 2008 10:42:07 -0400
>
> Good morning everyone,
>
> I've got a sql statement that is running quite slow. I
Good morning everyone,
I've got a sql statement that is running quite slow. I've indexed
everything I can that could possibly be applicable but I can't seem to
speed it up.
I've put up the table structures, row counts, the sql statement and
the explain dump of the
tech user wrote:
Add an alias for the subquery
select * from ( select ) my_alias where dd >= 3;
Better, use a having clause and eliminate the subquery. Odds are it
will be more efficient in MySQL.
How to replace the original one with a having statement?
Thanks again.
sele
>
> Add an alias for the subquery
>
> select * from ( select ) my_alias where dd >= 3;
>
> Better, use a having clause and eliminate the subquery. Odds are it
> will be more efficient in MySQL.
>
How to replace the original one with a having statement?
Thanks again.
Get the n
own alias
But I can execute the sql statement of "select uin,count(*) as dd from
active_users where date >= date_add(curdate(),interval -30 day) group by
uin" successfully.
How to fixup it? thanks!
Get the name you always wanted with the new y7mail email address.
ww
n execute the sql statement of "select uin,count(*) as dd from
active_users where date >= date_add(curdate(),interval -30 day) group by
uin" successfully.
How to fixup it? thanks!
Get the name you always wanted with the new y7mail email address.
www.yahoo7.com.au/y7mail
[EMAIL PROTECTED] wrote:
Daevid Vincent wrote:
Nope. I've only ever use mySQL. I only ever care to use mySQL. mySQL
puts in
plenty of other features that no other RDBMS has or uses, and other RDBMS
have features that mySQL has, so what's the problem. Unless I was porting
to/from another RDBMS?
Daevid Vincent wrote:
Nope. I've only ever use mySQL. I only ever care to use mySQL. mySQL puts in
plenty of other features that no other RDBMS has or uses, and other RDBMS
have features that mySQL has, so what's the problem. Unless I was porting
to/from another RDBMS?
This strikes me as a *ter
-
> From: Peter Brawley [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 23, 2007 5:39 PM
> To: Daevid Vincent
> Cc: mysql@lists.mysql.com
> Subject: Re: Why can't I still not use an ALIAS in the SELECT
> portion of an SQL statement?
>
> >When will I be able to do so
When will I be able to do something seemingly
so basic as this re-use of an alias?
Do you know an implementation of SQL which allows this?
PB
Daevid Vincent wrote:
When will I be able to do something seemingly so basic as this re-use of an
alias?
SELECT DATE_ADD('2007-10-23', INTERVAL user_a
When will I be able to do something seemingly so basic as this re-use of an
alias?
SELECT DATE_ADD('2007-10-23', INTERVAL user_access_hours HOUR)
AS group_duration_date,
UNIX_TIMESTAMP(group_duration_date)
AS group_duration_date_timestamp
FROM end_user
ums f, ibf_categories c
LEFT JOIN ibf_moderators m ON (f.id=m.forum_id)
WHERE c.id=f.category
ORDER BY c.position, f.position
Error:
Unknown column 'f.id' in 'on clause'
The alias seem not working?
What should I do, I dont want to rewrite all my
gt; LEFT JOIN ibf_moderators m ON (f.id=m.forum_id)
> WHERE c.id=f.category
> ORDER BY c.position, f.position
>
> Error:
> Unknown column 'f.id' in 'on clause'
>
> The alias seem not working?
> What should I do, I dont want to rewrite
ition, f.position
Error:
Unknown column 'f.id' in 'on clause'
The alias seem not working?
What should I do, I dont want to rewrite all my sql statement
Thanks.
Jason
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http
Hi,
2006/6/16, Takanobu Kawabe <[EMAIL PROTECTED]>:
[snip]
I tried this statement without error.
But Ihave some questions.
1.How many left join keywords can I use in one SQL statement if
there
are 5000 datas in one table?
as this blog point out, its 31 or 61 dep
Takanobu Kawabe schrieb:
> Hello, my name is Takanobu Kawabe.
こんいちわ孝信さん:)
> I have some questions about left join SQL statement.
>
> I want to join some tables, and using left join statement .
>
> the system is the following. I use two machines.
>
&g
Hello, my name is Takanobu Kawabe.
I have some questions about left join SQL statement.
I want to join some tables, and using left join statement .
the system is the following. I use two machines.
I created the same databases and tables on both machines.
OS : Debian
In the last episode (May 18), Jim said:
> Is there any way of getting the max_allowed_packet setting via a SQL
> statement?
mysql> SHOW VARIABLES LIKE 'max_allowed_packet';
++--+
| Variable_name | Value|
++--+
|
Hi All,
Is there any way of getting the max_allowed_packet setting via a SQL
statement?
Eg.
select version(); returns the version and need to do same for
max_packet_size.
First of all thanks all for your answers.
Second I'll explain what I manage to do in regard with this issue,
maybe someone else may need it in the future.
So, first I have started by changing the way I have stored the `ip`
field from varchar(15) to int unsigned and populated this field with
the 4
Hi all!
(Sorry for the late reply.)
Puiu Hrenciuc wrote (re-ordered):
"Barry" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Puiu Hrenciuc wrote:
Hi,
I have a table ( MyISAM, MySQL 5.0.20, FreeBSD ) containing network
traffic data :
record_time datetime - time when recording
2006/4/13, Puiu Hrenciuc <[EMAIL PROTECTED]>:
> Hi,
>
> I have a table ( MyISAM, MySQL 5.0.20, FreeBSD ) containing network traffic
> data :
>
> record_time datetime - time when recording was added
> ip char(15) - ip that generated the traffic
> type tinyint(3) - traffic type ( 1 - local, 2 - inte
Hmmm, I have omited that :
I also have an index on (ip,type) in that order
"Barry" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Puiu Hrenciuc wrote:
>> Hi,
>>
>> I have a table ( MyISAM, MySQL 5.0.20, FreeBSD ) containing network
>> traffic data :
>>
>> record_time datetime -
Puiu Hrenciuc wrote:
Hi,
I have a table ( MyISAM, MySQL 5.0.20, FreeBSD ) containing network traffic
data :
record_time datetime - time when recording was added
ip char(15) - ip that generated the traffic
type tinyint(3) - traffic type ( 1 - local, 2 - internet )
inbound int(10) - in bytes
o
Hi,
I have a table ( MyISAM, MySQL 5.0.20, FreeBSD ) containing network traffic
data :
record_time datetime - time when recording was added
ip char(15) - ip that generated the traffic
type tinyint(3) - traffic type ( 1 - local, 2 - internet )
inbound int(10) - in bytes
outbound int(10) - out by
nal Message-
> From: Greg Donald [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 31, 2006 2:38 PM
> To: mysql@lists.mysql.com
> Subject: Re: Update or insert with a single SQL statement?
>
> On 3/31/06, Brian Dunning <[EMAIL PROTECTED]> wrote:
> > I have a
On 3/31/06, Brian Dunning <[EMAIL PROTECTED]> wrote:
> I have a really simple two-column database:
>
> domain_name (primary key)
> timestamp
>
> I'm trying to keep track of the referrer of every visit to a web
> site, and I'm looking for a single SQL state
I have a really simple two-column database:
domain_name (primary key)
timestamp
I'm trying to keep track of the referrer of every visit to a web
site, and I'm looking for a single SQL statement (since my ISP limits
the total number of calls I can make in a day) that will either
----
From: "Søren Merser" <[EMAIL PROTECTED]>
To:
Sent: Sunday, March 05, 2006 4:37 PM
Subject: Re: Help on sql statement (not MySQL specifik)
Hi
Thank You for all Your efforts
I'll try once again to clarify my problem
My tabel (t_temp) isn't corrupt but is the resu
[EMAIL PROTECTED]>
To: "Michael Stassen" <[EMAIL PROTECTED]>
Cc: "Søren Merser" <[EMAIL PROTECTED]>;
Sent: Sunday, March 05, 2006 9:05 PM
Subject: Re: Help on sql statement (not MySQL specifik)
You're absolutely right that I'd need some good luck for thi
probably be a lot easier if the data was clean to start with.
In any case, thanks for keeping me honest.
--
Rhino
- Original Message -
From: "Michael Stassen" <[EMAIL PROTECTED]>
To: "Rhino" <[EMAIL PROTECTED]>
Cc: "Søren Merser" <[EMAIL
Rhino wrote:
I don't really understand _why_ you want to do this but here is a query
that gives the result you want:
select id, case type when 4 then 4 else null end as type
from Soren01
group by id;
The GROUP BY ensures that you get one row for each value of id; the case
expression in the Se
le will try to help you.
--
Rhino
- Original Message -
From: "Michael Stassen" <[EMAIL PROTECTED]>
To: "Søren Merser" <[EMAIL PROTECTED]>
Cc:
Sent: Sunday, March 05, 2006 1:13 PM
Subject: Re: Help on sql statement (not MySQL specifik)
Søren Merser wrote:
says that if the value of the type is 4, leave it
alone, otherwise display null.
--
Rhino
- Original Message -
From: "Søren Merser" <[EMAIL PROTECTED]>
To: ; "Rhino" <[EMAIL PROTECTED]>
Sent: Sunday, March 05, 2006 11:46 AM
Subject: Re: Help on sql state
Søren Merser wrote:
Hi, I'll try
I need one record for each id in the tabel, i.e. NO duplicate id's with
TYPE set to 4 or NULL
Now, the TYPE of id 2 is 4 so I peserve it;
As id 2 has more than one entry I have to delete it/them
Id's with TYPE = NULL (id 1,4,5)is kept
Id 5 (and 6) has two rec
<-NULL
7| 5|3<-DROP
8| 6|7<-NULL
9| 6|3 <-DROP
What I neede is a SQL statement that for a given value of TYPE, lets say
4,
selects all the unique id
I think he wants to update rows where != 4 to null
that is, update TYPE setting TYPE to null where TYPE != 4
-Ron
Rhino wrote:
- Original Message - From: "Søren Merser" <[EMAIL PROTECTED]>
To:
Sent: Sunday, March 05, 2006 9:12 AM
Subject: Help on sql statement (no
- Original Message -
From: "Søren Merser" <[EMAIL PROTECTED]>
To:
Sent: Sunday, March 05, 2006 9:12 AM
Subject: Help on sql statement (not MySQL specifik)
Hi
Could someone please help me out here?
TABLE:
RECNO| ID |TYPE
---
9| 6|3<-DROP
What I neede is a SQL statement that for a given value of TYPE, lets say 4,
selects all the unique id's with TYPE = 4 when appropriate otherwise NULL
like:
SOLUTION:
RECNO| ID |TYPE
-
1
best wishes
Ch
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: 14 December 2005 19:22
To: Jesse
Cc: mysql@lists.mysql.com
Subject: Re: SQL Statement Help
"Jesse" <[EMAIL PROTECTED]> wrote on 12/14/2005 02:03:22 P
"Jesse" <[EMAIL PROTECTED]> wrote on 12/14/2005 02:03:22 PM:
> Hello,
> I need help building a SQL Statement. I'm currently using MySQL
> 5.something. This one is kind of strange, and I can't seem to figure
out
> how to do it.
>
> I have a t
> Hello,
> I need help building a SQL Statement. I'm currently using MySQL
> 5.something. This one is kind of strange, and I can't seem to figure out
> how to do it.
>
> I have a table named Participants. Each Participant is allowed to bring up
> to 5 Guests. In
Hello,
I need help building a SQL Statement. I'm currently using MySQL
5.something. This one is kind of strange, and I can't seem to figure out
how to do it.
I have a table named Participants. Each Participant is allowed to bring up
to 5 Guests. Instead of putting the names in
Hi Peter, all!
Peter Matulis wrote:
--- Joerg Bruehe <[EMAIL PROTECTED]> wrote:
[[...]]
CREATE TABLE users (
id PRIMARY KEY,
priority integer NOT NULL DEFAULT '7',
policy_id integer unsigned NOT NULL DEFAULT '1',
Even though this may work, it is wrong IMNSHO:
You set character strings
--- Joerg Bruehe <[EMAIL PROTECTED]> wrote:
> Sujay Koduri wrote:
> > You havent specified the datatype for the column 'id'.
>
> Right, this should be fatal.
> But I also take issue with other parts:
>
> >
> > CREATE TABLE users (
> > id PRIMARY KEY,
> > priority integer NOT NULL DEFAULT
Harald Fuchs wrote:
In article <[EMAIL PROTECTED]>,
Joerg Bruehe <[EMAIL PROTECTED]> writes:
CREATE TABLE users (
id PRIMARY KEY,
priority integer NOT NULL DEFAULT '7',
policy_id integer unsigned NOT NULL DEFAULT '1',
Even though this may work, it is wrong IMNSHO:
You set character strings
In article <[EMAIL PROTECTED]>,
Joerg Bruehe <[EMAIL PROTECTED]> writes:
>> CREATE TABLE users (
>> id PRIMARY KEY,
>> priority integer NOT NULL DEFAULT '7',
>> policy_id integer unsigned NOT NULL DEFAULT '1',
> Even though this may work, it is wrong IMNSHO:
> You set character strings as defaul
Hi all, Peter!
Sujay Koduri wrote:
You havent specified the datatype for the column 'id'.
Right, this should be fatal.
But I also take issue with other parts:
[[...]]
-Original Message-
From: Peter Matulis [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 15, 2005 10:57 AM
[[...
You havent specified the datatype for the column 'id'.
sujay
-Original Message-
From: Peter Matulis [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 15, 2005 10:57 AM
To: mysql@lists.mysql.com
Subject: where is the mistake in this SQL statement?
{ this is a resend, forgot
{ this is a resend, forgot subject in original posting }
Hello, I am using MySQL 4.0.24 on OpenBSD 3.8.
I am having difficulty creating a SQL schema. My attempts contain
lines like:
CREATE TABLE users (
id PRIMARY KEY,
priority integer NOT NULL DEFAULT '7',
policy_id integer unsigned NOT
and add "AS CO" following the END
of the case statement.
-Original Message-
From: Jesse Castleberry [mailto:[EMAIL PROTECTED]
Sent: Friday, November 04, 2005 3:54 PM
To: MySQL List
Subject: SQL Statement Conversion
I'm converting an application from SQL Server to MySQL. I ha
I'm converting an application from SQL Server to MySQL. I have the
following query that I need to convert:
SELECT A.*, CO = CASE CounselorOnly WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' END
FROM Activities a ORDER BY Activity
What is the proper syntax for this in MySQL?
Thanks,
Jesse
--
MySQL Genera
Hi Shawn:
Just wanted to publicly thank you for the time you took to help me. I think
that it is important that guys like yourself who take time out from your busy
work be appreciated when their solution made a huge difference.
I was developing an ASP application along with Crystal reports for
Chen" <[EMAIL PROTECTED]>
To:
Sent: Monday, October 24, 2005 11:43 PM
Subject: Help needed for SQL statement
> Hi,
>
> I have such a situation:
>
> There is a table with gene_ids and clone_ids. Each gene only resides on a
> single clone and each clone may contain multipl
Hi,
I have such a situation:
There is a table with gene_ids and clone_ids. Each gene only resides on a
single clone and each clone may contain multiple genes. How do would I
find how many genes are on each and every clone?
Thanks in advance.
X.Chen
--
MySQL General Mailing List
For list arch
D = 0
> >
> >J.R.
> >
> >-Original Message-
> >From: C.F. Scheidecker Antunes [mailto:[EMAIL PROTECTED]
> >Sent: Sunday, October 16, 2005 1:45 PM
> >To: mysql@lists.mysql.com
> >Subject: SQL statement help
> >Importance: High
> >
>
it for you.
UPDATE table_one t1, table_two t2 SET t1.ID = t2.ID WHERE t2.num =
t1.num
AND t1.ID = 0
J.R.
-Original Message-
From: C.F. Scheidecker Antunes [mailto:[EMAIL PROTECTED] Sent:
Sunday, October 16, 2005 1:45 PM
To: mysql@lists.mysql.com
Subject: SQL statement help
Importance
PROTECTED] Sent:
Sunday, October 16, 2005 1:45 PM
To: mysql@lists.mysql.com
Subject: SQL statement help
Importance: High
Hello All,
I have two MySQL 4.1 tables. The first table has an ID field which is
set to
zero. The second one has ID fields and filenames.
I need a single SQL statement to set the
statement help
Importance: High
Hello All,
I have two MySQL 4.1 tables. The first table has an ID field which is set to
zero. The second one has ID fields and filenames.
I need a single SQL statement to set the ID from table 1 to the ID from
table 2 ONLY IF the ID on one is zero.
That is, if the ID on
: mysql@lists.mysql.com
Subject: SQL statement help
Importance: High
Hello All,
I have two MySQL 4.1 tables. The first table has an ID field which is set to
zero. The second one has ID fields and filenames.
I need a single SQL statement to set the ID from table 1 to the ID from
table 2 ONLY IF the
Hello All,
I have two MySQL 4.1 tables. The first table has an ID field which is
set to zero. The second one has ID fields and filenames.
I need a single SQL statement to set the ID from table 1 to the ID from
table 2 ONLY IF the ID on one is zero.
That is, if the ID on table one is not set
;
> best regards
> Imran
>
>
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "Imran" <[EMAIL PROTECTED]>
> Cc:
> Sent: Tuesday, October 11, 2005 11:33 AM
> Subject: Re: Help on writing a sql statement
>
>
&g
ay, October 11, 2005 11:33 AM
Subject: Re: Help on writing a sql statement
> Will you have name collisions with the same temporary table names used
> from different connections? Nope.
>
> Temporary tables and user-defined (@-variables) are connection-specific.
> Even if the same use
> table will exist already exist
>
>
> best regards
> Imran.
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "Imran" <[EMAIL PROTECTED]>
> Cc:
> Sent: Tuesday, October 11, 2005 9:49 AM
> Subject: Re: Help on writing
ay, October 11, 2005 9:49 AM
Subject: Re: Help on writing a sql statement
> (my response bottom-posted. See below - SG)
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > To: "Imran" <[EMAIL PROTECTED]>
> > Cc:
> > Sent: Mond
eport` int(10) default NULL,
> PRIMARY KEY (`ID`),
> KEY `ProdNo` (`ProdNo`),
> KEY `Branch` (`Branch`)
> )
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "Imran" <[EMAIL PROTECTED]>
> Cc:
> Sent: Monday, October 10, 2005 4
l Message -
From: <[EMAIL PROTECTED]>
To: "Imran" <[EMAIL PROTECTED]>
Cc:
Sent: Monday, October 10, 2005 4:17 PM
Subject: Re: Help on writing a sql statement
> "Imran" <[EMAIL PROTECTED]> wrote on 10/10/2005 03:52:21 PM:
>
> > Hi all:
> > I
"Imran" <[EMAIL PROTECTED]> wrote on 10/10/2005 03:52:21 PM:
> Hi all:
> I need some help in writing a sql statement.
>
> I have three tables (Sales, Cust and Product). The sales table contains
a
> large volume of data and I want to create a sql to group
Hi all:
I need some help in writing a sql statement.
I have three tables (Sales, Cust and Product). The sales table contains a
large volume of data and I want to create a sql to group the sales table
then join the resultant to both the Cust and Prod and to have additional
fields selected
C.F. Scheidecker Antunes wrote:
I want to insert the blob file from table1 where id = 1 to table2.
To select the blob I would issue: select file from table1 where id = 1
To insert I would do: insert into table2 (blob) values(?)
INSERT INTO table2 (blob) SELECT file FROM table1 WHERE id=1
--
J
Hello everyone:
I have two tables that store a blob.
They both have Id fields.
What I would like to do is, given an id, copy the blob stored on table
one to table two.
I could do that in my java program by selecting and retrieving the blob
from table 1 and then issuing
a insert/replace statemen
On Thursday 18 August 2005 16:37, Gleb Paharenko wrote:
> Hello.
>
> These links might be helpful:
> http://dev.mysql.com/doc/mysql/en/query-log.html
> http://dev.mysql.com/doc/mysql/en/debugging-client.html
> http://dev.mysql.com/doc/mysql/en/debugging-server.html
>
> Use a fresh ver
from prepared statements properly.
Darrell Cormier <[EMAIL PROTECTED]> wrote:
> Is there a way to get MySQL to report the SQL statement it receives from
> a prepared statement execution (from a program using the C-API )? I am
> wondering what the SQL statement looks like tha
Is there a way to get MySQL to report the SQL statement it receives from
a prepared statement execution (from a program using the C-API )? I am
wondering what the SQL statement looks like that is being generated from
my program to help debug it.
Thanks,
DC
--
Darrell Cormier <[EM
ef',
> 'PRIMARY,order_line_ol_i_id,order_line_ol_o_id,order_line_test',
> 'order_line_ol_o_id', '4', 'tpcw.orders.o_id', 1, 'Using where'
> 3, 'SUBQUERY', '', '', '', ''
x27;, 1,
'Using where; Using index'
2, 'DEPENDENT SUBQUERY', 'order_line', 'ref',
'PRIMARY,order_line_ol_i_id,order_line_ol_o_id,order_line_test',
'order_line_ol_o_id', '4', 'tpcw.orders.o_id', 1, 'Using where'
3, '
sing index'
> 2, 'DEPENDENT SUBQUERY', 'order_line', 'ref',
> 'PRIMARY,order_line_ol_i_id,order_line_ol_o_id,order_line_test',
> 'order_line_ol_o_id', '4', 'tpcw.orders.o_id', 1, 'Using where'
> 3, 'SUBQUERY', '
ine_test',
'order_line_ol_o_id', '4', 'tpcw.orders.o_id', 1, 'Using where'
3, 'SUBQUERY', '', '', '', '', '', '', , 'Select tables optimized away
Thank you SGreen.But i can'optimize the sql statement like your way because
this query must describe in one sql statement.So i think i maybe optimize
this sql statement through creating high efficiency index or describe this
sql statement in other method. Rewrite this sql statement must i
王 旭 <[EMAIL PROTECTED]> wrote on 07/18/2005 03:12:28 AM:
> NO effect :-(
>
> >From: pow <[EMAIL PROTECTED]>
> >To: 王 旭 <[EMAIL PROTECTED]>
> >Subject: Re: optimize a sql statement
> >Date: Mon, 18 Jul 2005 11:51:23 +0800
> >
NO effect :-(
From: pow <[EMAIL PROTECTED]>
To: 王 旭 <[EMAIL PROTECTED]>
Subject: Re: optimize a sql statement
Date: Mon, 18 Jul 2005 11:51:23 +0800
Do u have composite index on order_line.ol_o_id AND order_line.ol_i_id?
You could try that...
王 旭 wrote:
> Now,I make this sql st
Now,I make this sql statement to easy.
Follow is the sql statement:
-
SELECT ol_i_id FROM orders,order_line
WHERE order_line.ol_o_id = orders.o_id
GROUP BY ol_i_id
Follow is my sql statement:
-
SELECT SUM(ol_qty) sumolqty, ol_i_id FROM orders, order_line
WHERE orders.o_id = order_line.ol_o_id AND orders.o_id > (SELECT
MAX(o_id)-1 FROM orders)
AND
Follow is my sql statement:
-
SELECT SUM(ol_qty) sumolqty, ol_i_id
FROM orders, order_line
WHERE orders.o_id = order_line.ol_o_id AND orders.o_id > (SELECT
MAX(o_id)-1 FROM orders) AND
SQL My wrote:
(B
(B> Hi! dear all,
(B> I encountered a problem with designing SQL statement. For example, I
(B> want to query population information from a "city" table, and the
(B> records returned must be ordered according to the population of the
(B
Hi! dear all,
(BI encountered a problem with designing SQL statement. For example, I
(Bwant to query population information from a "city" table, and the
(Brecords returned must be ordered according to the population of the
(Bcity. Like
Arghh... shame on me forever.
I'm speachless.
Mikhail Entaltsev wrote:
Missed FROM clause... ;)
Best regards,
Mikhail.
- Original Message -
From: "Mário Gamito" <[EMAIL PROTECTED]>
To:
Sent: Friday, March 11, 2005 1:49 PM
Subject: Problem in a very simple SQL stateme
[snip]
select count(email) where email='[EMAIL PROTECTED]';
[/snip]
select count(email) FROM TABLE where email='[EMAIL PROTECTED]';
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Missed FROM clause... ;)
Best regards,
Mikhail.
- Original Message -
From: "Mário Gamito" <[EMAIL PROTECTED]>
To:
Sent: Friday, March 11, 2005 1:49 PM
Subject: Problem in a very simple SQL statement
> Hi,
>
> Why do i get an error on this statement:
>
Hi,
Why do i get an error on this statement:
select count(email) where email='[EMAIL PROTECTED]';
The error is:
"ERROR 1064: You have an error in your SQL syntax near 'where
email='[EMAIL PROTECTED]'' at line 1"
The statement seems pretty clear to me, but obviously something's wrong.
What can it
; # LIMIT no longer accepts negative arguments. Use some large number
>(maximum 18446744073709551615) instead of -1.
>
> not sure why it was changed, though.
>
This is going to break a fair number of phpMyEdit scripts because
phpMyEdit's default template recommends $opts[&
Hi list,
There is problem when with executing the sql statement in mysql 5.0.
I m not sure whether version 4.x has the same problem.
The problem is if I use static (hardcoded) values in the SQL statement,
mysql returns result for each element in the array.
If I use dynamically allocated value
1 - 100 of 263 matches
Mail list logo