This can also help:
select id,value from table order by value desc limit 1;
Cheers
Claudio
2009/9/10 Slackli User
> Thanks all the info.
> Just got what I wanted.
>
> 2009/9/10 Wolfgang Schaefer :
> > John Daisley schrieb:
> >> SELECT MAX(value), id FROM table
> >> GROUP BY id;
> >>
> >>
>
Thanks all the info.
Just got what I wanted.
2009/9/10 Wolfgang Schaefer :
> John Daisley schrieb:
>> SELECT MAX(value), id FROM table
>> GROUP BY id;
>>
>>
>>
>
> I guess what Slackli had in mind was more something like this:
> SELECT id, value
> FROM table
> WHERE value = (SELECT max(value) FROM
John Daisley schrieb:
> SELECT MAX(value), id FROM table
> GROUP BY id;
>
> Regards
>
> John Daisley
> Mobile +44(0)7812 451238
> Email j...@butterflysystems.co.uk
>
> Certified MySQL 5 Database Administrator (CMDBA)
> Certified MySQL 5 Developer
> Cognos BI Developer
>
> ---
>
SELECT MAX(value), id FROM table
GROUP BY id;
Regards
John Daisley
Mobile +44(0)7812 451238
Email j...@butterflysystems.co.uk
Certified MySQL 5 Database Administrator (CMDBA)
Certified MySQL 5 Developer
Cognos BI Developer
---
Sent from HP IPAQ mobile device.
-Origina
the thing to remember is that if you only want strings that start with
CAT you'd never want to query with %CAT% because this could match
DOG_CATHY.
% is a wildcard that matches any number of characters including none.
if you want to match a single character you use _
if you actually need to s
On 7/4/07, Dan Nelson <[EMAIL PROTECTED]> wrote:
In the last episode (Jul 04), David T. Ashley said:
> On 7/4/07, gary <[EMAIL PROTECTED]> wrote:
> > SELECT column FROM table WHERE column LIKE "CAT\_%";
>
> Would it be reasonable to assume that if "column" is indexed, the
> query would execut
In the last episode (Jul 04), David T. Ashley said:
> On 7/4/07, gary <[EMAIL PROTECTED]> wrote:
> > SELECT column FROM table WHERE column LIKE "CAT\_%";
>
> Would it be reasonable to assume that if "column" is indexed, the
> query would execute quickly, i.e. I would assume that the indexing
>
On 7/4/07, gary <[EMAIL PROTECTED]> wrote:
SELECT column FROM table WHERE column LIKE "CAT\_%";
Would it be reasonable to assume that if "column" is indexed, the query
would execute quickly, i.e. I would assume that the indexing would
facilitate this kind of query?
SELECT column FROM table WHERE column LIKE "CAT\_%";
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
On Sun, April 29, 2007 05:28, Jeff Pang wrote:
> Hello list,
>
> I want to get the counter for db-items by each day,so I wrote this sql:
>
> select count(*) as dd from items group by updatetime;
>
> But sorry "updatetime" is "datetime" type,not "date" type.Then I can't get
> the correct result.
>
;
Cc:
Sent: Wednesday, August 23, 2006 3:07 PM
Subject: Re: Re: How to query bind address?
Is it running on Windows, James? You may have to allow connections
through to MySQL in Windows Firewall.
Otherwise it seems like maybe it's been started with --skip-networking ?
Dan
On 8/23/06, Ja
Is it running on Windows, James? You may have to allow connections
through to MySQL in Windows Firewall.
Otherwise it seems like maybe it's been started with --skip-networking ?
Dan
On 8/23/06, James Eaton <[EMAIL PROTECTED]> wrote:
- Original Message -
From: "Dan Buettner" <[EMAIL P
- Original Message -
From: "Dan Buettner" <[EMAIL PROTECTED]>
I believe MySQL listens on all IPs ... what if any error message are
you getting?
From SQLyog I get:
Error No. 2003
Can't connect to MySQL server on '192.168.9.2' (10061)
Can you access other services (SSH, telnet,
I believe MySQL listens on all IPs ... what if any error message are
you getting?
Can you access other services (SSH, telnet, FTP) over the same routes?
Can you telnet to MySQL over those routes? If so you may have an
authentication problem, not a connection problem. Here's a sample of
what a
At 06:20 PM 7/20/2006, Martin Jespersen wrote:
As long as backticks are used around fieldnames, spaces and/or reserved
words are fine, tho it does tend to create more work for the user ;)
Correct. But how many people want to create more work for themselves? A
show of hands please!
Mike
mo
As long as backticks are used around fieldnames, spaces and/or reserved
words are fine, tho it does tend to create more work for the user ;)
mos wrote:
At 12:02 PM 7/20/2006, you wrote:
I've got a table of people who registered for a convention. Each
person has a registration date, kept in a
At 12:02 PM 7/20/2006, you wrote:
I've got a table of people who registered for a convention. Each person
has a registration date, kept in a standard date field. How do I select
for people who registered in a particular month or year? The obvious
tests like:
Select * from Capclave2005reg
W
Barry, I think you've got too many quotes in your SQL - the db is
trying to find the year from the string 'date paid'. You want to use
it as a column name, so drop the quotes:
Select * from Capclave2005reg
Where Year(Date Paid) = 2004;
If you've really got a space in your column name, try enclo
Hi all,
Please, do NOT send messages to a public mailinglist
as "high priority" by flagging the email itself. You're
sending this message to hundreds/thousands of people.
It might be "important" to you, but not for each
recipient. If someone has filters/triggers for "important"
email, he will get
e 2004 15:46
Para: 'Alonso, Claudio Fabian '; ''Steve Davies' '
CC: '''[EMAIL PROTECTED]' ' '
Asunto: RE: How to query an oracle table from a mysql database
A custom MySQL UDF is one solution if you are comfortable with C.
Off list questi
Sent: 7/7/04 11:18 AM
Subject: RE: How to query an oracle table from a mysql database
Importance: High
Hello Steve, hello Victor,
Thanks for your answers.
My PHP application needs to see this Oracle table, but as far as I could
see
PHP has problems with Oracle 9.2.0. I got a conection problem and f
At 13:18 -0300 7/7/04, Alonso, Claudio Fabian wrote:
Hello Steve, hello Victor,
Thanks for your answers.
My PHP application needs to see this Oracle table, but as far as I could see
PHP has problems with Oracle 9.2.0. I got a conection problem and found in
the PHP's bug database that it isn't curre
No, that isn't possible using mySQL.
Try linking PHP with older client libraries (9.0.1,
8.1.5, etc) instead of the newer 9.2 libraries and see
if that fixes your problem with PHP. You can download
them from otn.oracle.com
swany
--- "Alonso, Claudio Fabian"
<[EMAIL PROTECTED]> wrote:
> Hello S
Hello Steve, hello Victor,
Thanks for your answers.
My PHP application needs to see this Oracle table, but as far as I could see
PHP has problems with Oracle 9.2.0. I got a conection problem and found in
the PHP's bug database that it isn't currently working.
As I'm familiar with PHP/MySQL, I'm try
abian '" <[EMAIL PROTECTED]>
CC: "''[EMAIL PROTECTED]' '" <[EMAIL PROTECTED]>
Subject: Re: How to query an oracle table from a mysql database
Date: Wed, 07 Jul 2004 17:02:59 +0100
MIME-Version: 1.0
Received: from lists.mysql.com ([213.136.52.31]) b
Try PHP, it has built in functions to access both DBs
HTH
Steve
Victor Pendleton wrote:
You may want to look into using a programming language such as C or Java
that communicates between both databases.
-Original Message-
From: Alonso, Claudio Fabian
To: '[EMAIL PROTECTED]'
Sent: 7/7/04 8
You may want to look into using a programming language such as C or Java
that communicates between both databases.
-Original Message-
From: Alonso, Claudio Fabian
To: '[EMAIL PROTECTED]'
Sent: 7/7/04 8:14 AM
Subject: How to query an oracle table from a mysql database
Importance: High
Goo
I'm stumped...
Now, I need to generate reports for a specific client. In the end,
for
a given month, I have to tell the client
1. Which invoices were for the purchase of blue widgets, only.
2. Which invoices were for the purchase of blue widgets and yellow
widgets, together.
3. Which invoices for
At 10:38 -0500 11/8/03, karthikeyan wrote:
I have a table with about 100 column with different column name. It is
difficult to remember all the field
names. But I know the last few columns are very important for query and
used frequently.
You cannot perform comparisons on columns by using column po
ORDER BY and LIMIT.
Jeremy March wrote:
I have an alphabetic list of records in a table and I want to display
the 25 previous and 25 next records before and after a selected
record. This would be easy if "before" and "after" meant sorted by id
number, but I need it sorted alphabetically. Doe
At 13:53 24/02/03 +0100, you wrote:
Hello.
On Mon 2003-02-24 at 11:28:05 +, [EMAIL PROTECTED] wrote:
> Hello,
>
> In a table like this:
>
> ID
> Item1 char(100)
> Item2 char(100)
> .
> .
> ItemN char(100)
>
> What's the cleanest way to do this mysql query:
>
> SELECT * FROM MyTable WHERE AnyCo
Hello.
On Mon 2003-02-24 at 11:28:05 +, [EMAIL PROTECTED] wrote:
> Hello,
>
> In a table like this:
>
> ID
> Item1 char(100)
> Item2 char(100)
> .
> .
> ItemN char(100)
>
> What's the cleanest way to do this mysql query:
>
> SELECT * FROM MyTable WHERE AnyColumn LIKE '%mysearch%'
>
> Only
On Wed, Jan 15, 2003 at 11:55:44PM +, [EMAIL PROTECTED] wrote:
>
> please look at page 194 of the reference manual...
>
> >(and if so how do you ask MySQL to create a temp table from the
> > results of aquery?)
>
> here's an example:
>
> mysql> create temporary table tmp (name varchar(20),
please look at page 194 of the reference manual...
>(and if so how do you ask MySQL to create a temp table from the
> results of aquery?)
here's an example:
mysql> create temporary table tmp (name varchar(20), owner varchar(20, species
varchar(10));
mysql> insert into tmp select name, owner,
Hello.
Please start a new thread instead of replying to an existing one. Or
else, your message will be sorted with the original thread for people
with decent mail readers.
On Wed 2003-01-15 at 14:42:05 -0500, [EMAIL PROTECTED] wrote:
> How do you query the table that is the results of a query?
B
If you're in Java you can call getMetaData on the ResultSet, and then call methods on
that (ResultSetMetaData) to determine number of columns, and type of each column.
This avoids the steps of creating/deleting a temp table.
What language are you using?
>
> From: Will Standley <[EMAIL PROTECT
Hi there,
I found a way to do it with the following query
select * from theTable
where 'test' like concat( theColumn, '%' );
Thanks for the help,
Andre
--- Andre Kirchner <[EMAIL PROTECTED]> wrote:
> thanks for the help, but what I really want is to
> select all the values that are a substrin
thanks for the help, but what I really want is to
select all the values that are a substring of 'test'
as 't', 'te', 'tes' and 'test', and so I was trying
the query
select * from theTable
where ( theColumn || '%' ) like 'test';
I think my previous email as a litle bit confusing.
Sorry for that :
justin,
Friday, June 14, 2002, 4:52:12 AM, you wrote:
jc> This seems like a dumb question--sorry. Looking at my table it shows
jc> 'MUL' instead of 'PRI' like the other tables. Did I forget to code
jc> unit_id as primary? Thanks, Justin
jc> mysql> desc property_units;
jc> ++--
Hi,
> This seems like a dumb question--sorry. Looking at my table it shows
> 'MUL' instead of 'PRI' like the other tables. Did I forget to code
> unit_id as primary? Thanks, Justin
mysql> show index from property_units;
Regards,
Sasa
»mysql, select, database«
---
On Fri, May 03, 2002 at 01:22:30PM +0200, Harald Fuchs wrote:
>
> How about "SHOW OPTIONS [LIKE wild]", nicely accompanying "SHOW VARIABLES"?
Yeah, that'd be the way to go, I think.
--
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878 Fax: (408) 349-54
Hi.
On Thu, May 02, 2002 at 12:02:44AM -0700, [EMAIL PROTECTED] wrote:
> On Tue, Apr 30, 2002 at 04:17:00PM +0200, Benjamin Pflugmann wrote:
> > Hi.
> >
> > Maybe I am blind, but I cannot find, how I can query the status of
> > one of the variables I can set with SET OPTION. I.e. if I do
> >
>
Try something like this
SELECT price, min(abs(price-value)) as Mini from table group by price order
by Mini LIMIT 1
Patrick
-Message d'origine-
De : Robert Badaracco [mailto:[EMAIL PROTECTED]]
Envoyé : mercredi 24 janvier 2001 05:47
À : [EMAIL PROTECTED]
Objet : How to query and return
43 matches
Mail list logo