if it is static then it works fine.but we have lots of codes in a table
which should be done similar operation.instead varifying staticly with c1,c2
can we make dynamic.
On 8/14/06, Peter Lauri [EMAIL PROTECTED] wrote:
SELECT SUM(IF(code='c1', code, IF(code='c2', code, 0))) -
SUM(IF(code='c4',
Not until we know the logic behind the code and how the calculations
should be done.
-Original Message-
From: VenuGopal Papasani [mailto:[EMAIL PROTECTED]
Sent: Monday, August 14, 2006 1:03 PM
To: Peter Lauri; mysql@lists.mysql.com
Subject: Re: query needed
if it is static then it works
How do I set mysqld hears only on eth0? i am using FC
linux.
-- God Bless Us --
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
MySQL General Mailing List
For list archives:
Hi.
There's a lot of '/tmp/ibE3FYj2' files inside my Linux server, created
by mysqld.
Does anybody know how to delete them after being used?
Thank you very much.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL
On Sat, 2006-08-12 at 08:38 -0400, Warren Crigger wrote:
Note that you should not just delete the bin logs. Instead
use PURGE MASTER LOGS. See
http://dev.mysql.com/doc/refman/4.1/en/purge-master-logs.html
hth,
mark
Sorry, accidently hit Ctrl/Enter :(
Anyway, I can't purge
On Mon, 2006-08-14 at 00:27 -0700, The Nice Spider wrote:
How do I set mysqld hears only on eth0? i am using FC
linux.
Add a setting for bind_address under the mysqld section in the my.cnf
file, set to the IP of eth0 (then restart the mysql server).
hth,
mark
--
MARK ADDISON
WEB
I think what you are looking for is GROUP_CONCAT. Without more info I can't
really tell though.
http://dev.mysql.com/doc/refman/4.1/en/group-by-functions.html
- Original Message -
From: Steffan A. Cline [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Sunday, August 13, 2006 6:53 PM
The problem is your GROUP BY on celec_id. MySQL is doing the grouping and thus only grabbing the first season_week_date value within
the grouping. I'm not sure what end result your are looking for. Grouping additionally by season_week_date might be what you are
looking for.
GROUP BY r.celeb_id,
Hi,
Does anyone have a clever way of returning; a requested value with one
value less than that value, and one value greater than that value with
one query.
For example T1 contains
ID
1234
1235
1236
1238
select ID from T1 where ID = 1235 and ID1235 and ID 1235 LIMIT 3
(obviously this
Michael,
I would think this is what you want.
Select ID from T1 where ID BETWEEN (id in question - 1) and (id in
question + 1)
If you want distinct values, place the distinct keyword in front of ID (i.e.
Select DISTINCT ID...
This should do it for you.
-Dan
Hi,
Does anyone have a clever
Michael DePhillips wrote:
Hi,
Does anyone have a clever way of returning; a requested value with
one value less than that value, and one value greater than that value
with one query.
For example T1 contains
ID
1234
1235
1236
1238
Assuming the id's are consecutive.
You want
Hi Dan,
Thanks for the prompt reply,
As I described it yes, you are correct, however, the id may not always
be one(1) value away. So the number one needs, somehow, to be replaced
with a way to get the next largest value and the previous less than
value.
Sorry for the lack of precision in
Hi,
I am trying to setup mysql on AIX 5.3L system with all patches installed (suma
update yesterday)
I have tried 3 ways and each failed...
1. I have tried the precompiled AIX 64 bit binary.
those failed to link with mysql++ (we use 1.7.40) and php (they didn't found
libmysqlclient which was
Michael DePhillips wrote:
Hi Dan,
Thanks for the prompt reply,
As I described it yes, you are correct, however, the id may not always
be one(1) value away. So the number one needs, somehow, to be replaced
with a way to get the next largest value and the previous less
than value.
Sorry
I think this will do it, although it takes three queries.
I'm assuming the id values are unique, even if there can be gaps
(that's what you might get with an AUTO_INCREMENT field). If the
values are not guaranteed to be unique then this may not give what
you want (if there are multiple
Hi Nigel,
A and B...please.
Perhaps a UDF could achieve my initial request...any ideas.
Thanks,
Michael
nigel wood wrote:
Michael DePhillips wrote:
Hi Dan,
Thanks for the prompt reply,
As I described it yes, you are correct, however, the id may not
always be one(1) value away. So the
Here's a single query version of Douglas's solution:
select @id:=6;
select distinct t.testid,
(select max(testid) from t where testid @id) as previousId,
(select min(testid) from t where testid @id) as nextId
from t
where [EMAIL PROTECTED]
Donna
Douglas Sims [EMAIL PROTECTED]
Hi All,
I need some suggestions from you. I need a comunication between Oracle
database with MySQL.
In my application there is a situation is arising, where i need to take some
data to MySql from a table which is in Oracle database (i am planning to
maintain that data in MySQL also). And from
--On August 14, 2006 9:11:30 PM +0530 balaraju mandala
[EMAIL PROTECTED] wrote:
Hi All,
I need some suggestions from you. I need a comunication between Oracle
database with MySQL.
http://www.webmethods.com/
They sell software to do this. Or...well... ActiveSoftware/ActiveWorks did
which
balaraju mandala wrote:
In my application there is a situation is arising, where i need to take
some
data to MySql from a table which is in Oracle database (i am planning to
maintain that data in MySQL also). And from MySQL my application will use
it. This whole thing should be happen
D'oh. Very good. I wish I'd thought of that.
In response to Michael DePhillips' point about the UDF - I believe
that in MySQL 5.x UDFs can't query tables. In Oracle, SQL Server,
etc. they can and I'm sure they will in the future.
Douglas Sims
[EMAIL PROTECTED]
On Aug 14, 2006, at
On Monday 14 August 2006 07:08 am, Michael DePhillips wrote:
select ID from T1 where ID = 1235 and ID1235 and ID 1235 LIMIT 3
(obviously this doesn't work) I would want to return
1234
1235
1236
mysql select int_value, (int_value + 1) as value2, (int_value - 1) as value3
FROM
I want to have the rows returned as one row
Such as
ROW 1 Mechanic, Carpenter, Plumber
You may want to try GROUP_CONCAT(expr) ...
http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To
On Mon, 2006-08-14 at 05:43 -0700, Steffan A. Cline wrote:
Here is a better example
mysql select listName from listItem limit 3;
+-+
| listName|
+-+
| PWC |
| Small Boats |
| Fiberglass |
+-+
3 rows in set (0.02 sec)
mysql
Does anyone have any ideas of how I can select the max value and insert the
next highest value?
I want something that would do something like this:
Insert into table1 (select max(field1)+1 from table1);
This obviously doesn't work.
I know if the table was set to auto-increment it wouldn't be
On 8/14/06, William DeMasi [EMAIL PROTECTED] wrote:
Does anyone have any ideas of how I can select the max value and insert the
next highest value?
I want something that would do something like this:
Insert into table1 (select max(field1)+1 from table1);
This obviously doesn't work.
I know
Hi All,
I was wondering if This is possiable.
I have a date column and want to have a trigger perform the following:
Look at all of the dates and then if the data is 3 days old. Delete the
corresponding tables related to that date, and then fianlly the row that told
me what tables are
On Mon, Aug 14, 2006 at 02:29:41PM +1000, Chris wrote:
Dave Shariff Yadallee - System Administrator a.k.a. The Root of the
Problem wrote:
On Mon, Aug 14, 2006 at 10:42:50AM +1000, Chris wrote:
Dave Shariff Yadallee - System Administrator a.k.a. The Root of the
Problem wrote:
I use SELECT
Machine info:
[EMAIL PROTECTED] utils]$ uname -a
Linux snv1 2.6.9-34.0.2.ELsmp #1 SMP Fri Jun 30 10:32:04 EDT 2006 x86_64 x86_64
x86_64 GNU/Linux
[EMAIL PROTECTED] utils]$ perl -v
This is perl, v5.8.8 built for x86_64-linux
[EMAIL PROTECTED] utils]$ more /etc/redhat-release
Red Hat Enterprise
Connie,
I had the same error with another program recently, but probably the
fix for yours is the same: try compile zlib with -fPIC by adding
-fPIC to CFLAGS in the Makefile.
Niels Larsen
Logg, Connie A. wrote:
Machine info:
[EMAIL PROTECTED] utils]$ uname -a
Linux snv1 2.6.9-34.0.2.ELsmp
Niels Larsen wrote:
Niels,
Do you mean in the Makefile for zlib?
Thanks!
Patrick
Connie,
I had the same error with another program recently, but probably the
fix for yours is the same: try compile zlib with -fPIC by adding
-fPIC to CFLAGS in the Makefile.
Niels Larsen
Logg, Connie A.
Yes .. and had to add it to jpeg-6b (on x86_64) to make that
work too.
Patrick Galbraith wrote:
Niels Larsen wrote:
Niels,
Do you mean in the Makefile for zlib?
Thanks!
Patrick
Connie,
I had the same error with another program recently, but probably the
fix for yours is the same: try
Asif Lodhi wrote:
Hi,
I have a query:
reformatted
INSERT INTO tmp2 (x)
SELECT ((t3.m * 100) + b.id) AS x2
FROM tmp3 t3
LEFT JOIN (SELECT (MAX(x) - ((MAX(x) div 100) * 100)) + 1 AS pid
FROM tmp2
WHERE (x div 100) = 2147
HAVING (MAX(x) -
On Monday 14 August 2006 12:35 pm, [EMAIL PROTECTED] wrote:
Look at all of the dates and then if the data is 3 days old. Delete the
corresponding tables related to that date, and then fianlly the row that
told me what tables are related to that date.
I'm kind of curious about the deleting of
All right, so how would one set up a select where
rows 1 and 2 are text and row 3 is a blob
and for argument sake assume jpg for the moment.
You want to select a row based on the content (image) of the jpg?
Not possible unless you pass the whole blob into mysql so it can
retrieve the
H you're close, very close. What you have actually does
work, with a little tweaking - you have an extra set of parens. I'm
on 5.0.21, FYI.
insert into products (productsid) select max(productsid)+1 from products;
Appears to work for both auto-incrementing and non-auto-inc columns.
Hello,
I have a table (see below) that has 111599 records in it.
When i do a query like select * from gallery_object where dir = 'dirname'
this query takes a very long time and while the query is going on it
locks the entire table so no one else can query it
yet a query like
select * from
Randy Paries wrote:
Hello,
I have a table (see below) that has 111599 records in it.
When i do a query like select * from gallery_object where dir = 'dirname'
Use explain to see if it's using the index:
explain select * from
it could be that for that particular directory you have a lot
Randy, it's possible your indexes are sadly out of date, or corrupted somehow.
Can you post the output of
EXPLAIN select * from gallery_object where dir = 'dirname';
as well as of
EXPLAIN select * from gallery_object
where parent_id = 1
and dir ='dirname'
and obj_type = 1
order by order_idx;
39 matches
Mail list logo