Jeff McKeon [EMAIL PROTECTED] wrote on 04/25/2005 03:00:55 PM:
I have a table that contains records that link back to a main talbe in a
many to one configuration linked by table1.id = table2.parentid
Table1 (one)
Table2 (many)
I want to pull the latest records from table2 for each record
]
Sent: lundi 25 avril 2005 21:01
To: mysql@lists.mysql.com
Subject: Query question
I have a table that contains records that link back to a main talbe in a
many to one configuration linked by table1.id = table2.parentid
Table1 (one)
Table2 (many)
I want to pull the latest records from table2
*This not an official mysql support answer
-Original Message-
From: Jeff McKeon [mailto:[EMAIL PROTECTED]
Sent: lundi 25 avril 2005 21:01
To: mysql@lists.mysql.com
Subject: Query question
I have a table that contains records that link back to a main talbe in a
many to one
Jeff,
Something like ...
SELECT *
FROM table2 AS a
WHERE datestamp = (
SELECT MAX( b.datestamp )
FROM table2 AS b
WHERE a.parentID = b.parentID
);
PB
-
Jeff McKeon wrote:
I have a table that contains records that link back to a main talbe in a
many to one configuration linked by table1.id =
'; mysql@lists.mysql.com
Subject: RE: Query question
mathias fatene [EMAIL PROTECTED] wrote on 04/25/2005 03:19:33 PM:
Hi,
You can do something like that :
mysql select * from son;
+--+
| a|
+--+
|1 |
|2 |
|3 |
+--+
3 rows in set (0.02 sec)
mysql select
Thanks all but I don't have a mysql version high enough for subqueries.
Thanks,
Jeff
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]
Sent: Monday, April 25, 2005 4:01 PM
To: Jeff McKeon
Cc: mysql@lists.mysql.com
Subject: Re: Query question
Jeff,
Something
support answer
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]
Sent: lundi 25 avril 2005 22:01
To: Jeff McKeon
Cc: mysql@lists.mysql.com
Subject: Re: Query question
Jeff,
Something like ...
SELECT *
FROM table2 AS a
WHERE datestamp = (
SELECT MAX( b.datestamp )
FROM
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 25, 2005 4:01 PM
To: Jeff McKeon
Cc: mysql@lists.mysql.com
Subject: Re: Query question
Jeff,
Something like ...
SELECT *
FROM table2 AS a
WHERE datestamp = (
SELECT MAX( b.datestamp )
FROM table2
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 25, 2005 4:01 PM
To: Jeff McKeon
Cc: mysql@lists.mysql.com
Subject: Re: Query question
Jeff,
Something like ...
SELECT *
FROM table2 AS a
WHERE datestamp = (
SELECT MAX( b.datestamp )
FROM table2
Mathias FATENE
Hope that helps
*This not an official mysql support answer
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]
Sent: lundi 25 avril 2005 22:17
To: Jeff McKeon
Cc: mysql@lists.mysql.com
Subject: Re: Query question
Jeff,
Then do it with 2
@lists.mysql.com
Subject: Re: Query question
Jeff,
Then do it with 2 queries,
SELECT @d := MAX( datestamp )
FROM table2
WHERE parentID = X;
SELECT *
FROM table2
WHERE parentID = X
@lists.mysql.com
Subject: Re: Query question
Jeff,
Then do it with 2 queries,
SELECT @d := MAX( datestamp )
FROM table2
WHERE parentID = X;
SELECT *
FROM table2
WHERE parentID = X AND [EMAIL PROTECTED];
PB
-
Jeff McKeon wrote:
Thanks all but I
: mysql@lists.mysql.com
Subject: Re: Query question
Jeff,
Something like ...
SELECT *
FROM table2 AS a
WHERE datestamp = (
SELECT MAX( b.datestamp )
FROM table2 AS b
WHERE a.parentID = b.parentID
);
PB
-
Jeff McKeon wrote:
I have
Jeff
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 25, 2005 4:17 PM
To: Jeff McKeon
Cc: mysql@lists.mysql.com
Subject: Re: Query question
Jeff,
Then do it with 2 queries,
SELECT @d := MAX( datest
]
Sent: Monday, April 25, 2005 4:17 PM
To: Jeff McKeon
Cc: mysql@lists.mysql.com
Subject: Re: Query question
Jeff
this right now or i'd upgrade,
believe me!
jeff
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 25, 2005 4:43 PM
To: Jeff McKeon
Cc: mysql@lists.mysql.com
Subject: Re: Query question
That's real syntax
mathias fatene [EMAIL PROTECTED] wrote on 04/25/2005 04:24:42 PM:
Hi,
Im sorry to disappoint you but this is an anti-performance solution.
Use joins rathers than subqueries, and don't use joins if you can (all
data in the mother table).
Imagine that table2 has 30.000.000 records, and not
25, 2005 4:36 PM
To: Jeff McKeon
Cc: mysql@lists.mysql.com
Subject: RE: Query question
Jeff McKeon [EMAIL PROTECTED] wrote on 04/25/2005
04:08:29 PM:
Thanks all but I don't have a mysql version high enough for
subqueries
answer
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: lundi 25 avril 2005 23:02
To: mathias fatene
Cc: 'Jeff McKeon'; mysql@lists.mysql.com; [EMAIL PROTECTED]
Subject: RE: Query question
mathias fatene [EMAIL PROTECTED] wrote on 04/25/2005 04:24:42 PM
Three tables like this:
--
product_lines
--
id
title
--
manufacturer
--
id
title
--
manufacturer_product_line_index
--
id
product_line_id
manufacturer_id
The index provides a one to many relationship - one product line
To: mysql@lists.mysql.com
Subject: Query question
Three tables like this:
--
product_lines
--
id
title
--
manufacturer
--
id
title
--
manufacturer_product_line_index
--
id
product_line_id
manufacturer_id
The index provides
Ed Lazor [EMAIL PROTECTED] wrote on 04/07/2005 12:39:01 PM:
Three tables like this:
--
product_lines
--
id
title
--
manufacturer
--
id
title
--
manufacturer_product_line_index
--
id
product_line_id
Whew, thanks Jon =)
-Original Message-
SELECT product_lines.* FROM product_lines LEFT JOIN
manufacturer_product_line_index ON
manufacturer_product_line_index.product_line_id = product_lines.id WHERE
product_lines.id IS NULL
--
MySQL General Mailing List
For list archives:
Just turn your subquery into another join
SELECT C2.City, N.Distance
FROM Cities C
INNER JOIN Nbc N ON C.CityID = N.PrimaryCityID
INNER JOIN Cities C2 ON C2.cityID = N.CityID
WHERE C.City = 'Los Angeles'
AND N.Distance 20
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
I upgraded my local mysql version to 4.1.10a and the below query
finally works :)
How can I now amend the query so it works on my remote server running
mysql 3.23.58 ? From one headache to another ;)
SELECT (
SELECT City
FROM Cities
WHERE CityID = N.CityID
), N.Distance
FROM Cities C
JOIN Nbc
What was wrong with Graham's simpler query?
PB
-
Graham Anderson wrote:
I upgraded my local mysql version to 4.1.10a and the below query
finally works :)
How can I now amend the query so it works on my remote server running
mysql 3.23.58 ? From one headache to another ;)
SELECT (
SELECT
In the simple query...
the city field showed the result 'Los Angeles' in every row
the distance field showed incorrect results to :(
City| Distance
Los Angeles 18
Los Angeles 5
Los Angeles 7
...
On Apr 1, 2005, at 1:59 PM, Peter
strangely, the query works intermittently :(
SELECT (
SELECT City
FROM Cities
WHERE CityId = N.CityId
), N.Distance
FROM Cities C
JOIN Nbc N ON C.CityId = N.PrimaryCityId
WHERE C.City = 'Los Angeles'
AND N.Distance 20
sometimes it works...other times it gives the mysql query error:
show keys from
What is the proper way to say this ?
SELECT C.City, N.Distance
FROM Cities C
JOIN Nearbycities N ON C.CityId = N.PrimaryCityId
WHERE N.CityId =
(SELECT Cities.CityId FROM Cities WHERE Cities.city = 'Los Angeles')
AND N.distance 20
I am trying to enter in a city and get all the nearby cites with
Graham Anderson wrote:
What is the proper way to say this ?
SELECT C.City, N.Distance
FROM Cities C
JOIN Nearbycities N ON C.CityId =ci N.PrimaryCityId
WHERE N.CityId =
(SELECT Cities.CityId FROM Cities WHERE Cities.city = 'Los Angeles')
AND N.distance 20
I am trying to enter in a city and get
I want to get everything from user than if record exist in admin so
user has admin(administrator) in table user with user.id =
admin.admin_id, so I need to get 'admin' first_name and last_name
If there is no record in table admin with adin.user_id = user.id ,
than I need at least all records from
Jerry Swanson [EMAIL PROTECTED] wrote on 03/29/2005 11:43:56 AM:
I want to get everything from user than if record exist in admin so
user has admin(administrator) in table user with user.id =
admin.admin_id, so I need to get 'admin' first_name and last_name
If there is no record in table
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
Hi, all
I hope somebody can help me.
Situation
Three tables
1.
++++
| id | name | region |
++++
| 13 | Name1 | 1 |
| 15 | Name2 | 2 |
| 47 | Name3 | 1 |
| 57 | Name4 | 2 |
| 65 | Name5 | 2 |
|
This has to be so simple, but my solution runs much slower than I would
expect it to. I'm wondering if there is a more efficient way to do this
type of query.
I have a table of email messages, I have another table containing all
of the email addresses linked to each email message
I want to
On 22-Dec-2004 Michael J. Pawlowsky wrote:
Im trying to come up with a more efficient method to do this.
I have a table where people enter some info into the table.
snip
I would like to allow the users to be able to see where they stand
rank
wise with everyone else.
Right now I
I use a table to log what pages on the website are getting visits with a
table structure like this:
ID
DateAdded
URL
Now I'm trying to query the database to see which URLs are most popular, but
I'm not sure how to go about doing this. Any ideas?
Thanks,
Ed
--
MySQL General Mailing List
This will return the top 50 urls in descending order of popularity.
SELECT URL, count(1) as popularity
FROM yourtablename
GROUP BY URL
ORDER BY popularity DESC
LIMIT 50;
Feel free to adjust as needed.
HTH,
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Ed Lazor [EMAIL
, December 23, 2004 1:46 PM
To: 'mysql'
Subject: Query question
I use a table to log what pages on the website are getting visits with a
table structure like this:
ID
DateAdded
URL
Now I'm trying to query the database to see which URLs are most popular, but
I'm not sure how to go about doing this. Any
Thanks, Shawn. I didn't think count would just limit to the items being
grouped - very handy =)
-Ed
SELECT URL, count(1) as popularity
FROM yourtablename
GROUP BY URL
ORDER BY popularity DESC
LIMIT 50;
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To
Im trying to come up with a more efficient method to do this.
I have a table where people enter some info into the table.
The more entries they add the more points they get.
(1 point per entry).
I would like to allow the users to be able to see where they stand rank
wise with everyone else.
Right
Try this:
CREATE TEMPORARY TABLE tmpRankings (
Rank int auto_increment,
entries int,
user_id int
)
INSERT tmpRankings (points, user_id)
SELECT count(1), user_id
FROM sometablenamehere
GROUP BY user_id
ORDER BY entries DESC;
This way the tmpRankings table contains an
Hi,
Mysql 4.0.14
In a seconrio, some reocrds are missing from a child
table. If we run this query it returns the missing
records:
select a.field1, b.field2 from table1 a left join
table2 b on (a.field1 = b.field1) where b.field1 is
null
I want to create entries in the child table (table2)
I want to create entries in the child table (table2)
for the missing records. In table2 the primary key is
of type Integer,
for each new entry it should be
Max(table2.PrimaryKeyfield) + 1.
Why not make the primary key in table2 autoincrement? If you have an
autoincrement field as primary
Thanks,
I did think of it but not having the option as this is
linked to executables, which I'm sure have some sorts
of calculation for this field to calculate the next
value.
regards
--- Jigal van Hemert [EMAIL PROTECTED] wrote:
I want to create entries in the child table
(table2)
for
I have a query statement set up for record returns
based on various where statements. The select
statement consists of a number of joins. One of those
joins includes a field that is marked no null.
Recently I did a mass insertion into the table. Into
this particular no null field were place 0's
Quite possibly since 0 could also mean false depending on your
comparison operator. For instance, using a generic if statement, these
two would both evaluate to false:
if(0)
if(null)
You should be very specific when checking for NULL.
WHERE field IS NOT NULL
or
WHERE field IS NULL
Also, you may
--- Brent Baisley [EMAIL PROTECTED] wrote:
Quite possibly since 0 could also mean false
depending on your
comparison operator. For instance, using a generic
if statement, these
two would both evaluate to false:
if(0)
if(null)
You should be very specific when checking for NULL.
WHERE
I have a table in which the first column is either 1 or 0. The second
column is a number between 0 and 59. I need to perform a query that returns
entries where:
1. IF the first column is 1, the second column is NOT 0
2. IF the first column is 0, the second column is anything.
It seems simple,
* John Mistler
I have a table in which the first column is either 1 or 0. The second
column is a number between 0 and 59. I need to perform a query
that returns
entries where:
1. IF the first column is 1, the second column is NOT 0
2. IF the first column is 0, the second column is
I'm hoping I can present this correctly. I'm trying
to determine how to set up my where condition as, 1
way has already failed me. While I continue to
figure this out (i'm a noob), I hope asking for some
advice here won't be too awful.
There is one main table where data is inserted and
that
I think I'm on the right track but still in question
After all the joins I added a and LocationState = x.
I'm not totally sure, because I want to search for
records based on (for now)3 conditions (state, city,
industry).
Two things I should mention , the somewhat strange
notation is becaue I'm
Stuart Felenstein wrote:
I'm hoping I can present this correctly. I'm trying
to determine how to set up my where condition as, 1
way has already failed me. While I continue to
figure this out (i'm a noob), I hope asking for some
advice here won't be too awful.
There is one main table where data
Well I feel like maybe I wasted some bandwidth here.
I think what I'm looking for is a square peg in a
round hole. That won't work.
More to the point :) , I do not having a problem with
the AND / OR / IN / NOT / etc.
What I think I was attempting was to come up with a
SQL statement that will
Im not sure if this is possible or not.
I have a Sales leads table.
Part of the table has 2 employee_ids.
1. The Sales person the lead is assigned to.
2. The Marketing person that generated the lead.
Then there is a employee table that has ids and names.
When generating a report for leads I would
You need to join the employee table twice, once for each id lookup, like this:
SELECT es.name AS sales_name, em.name AS marketing_name, leads.id
FROM leads JOIN employee es ON leads.salesid = es.id
JOIN employee em ON leads.marketingid = em.id;
Michael
Michael J. Pawlowsky wrote:
Thanks a lot Michael.
A regular join did not seem to work. But when I tried a LEFT JOIN it worked.
A cut down example of it is the following.
SELECT global_lead.id, rep_no, es.fname as sales_name, em.fname as
marketing_name
FROM global_lead
LEFT JOIN global_employee es ON global_lead.rep_no =
Right. If the employee ID in either the rep_no or entered_by columns does
not have a corresponding row in the global_employee table, then the regular
join won't match that row. In that case, as you found, you need a LEFT
JOIN, which guarantees you get the rows from the table on the left, and
to:
|
| Subject: update query question
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Wednesday, July 07, 2004 11:08 AM said:
Have you tried this other way of making an inner join?
no i did not because i did know you could do a JOIN on an UPDATE. thanks
for your suggestions i will try them out.
chris.
--
MySQL General Mailing
hello,
i've had to change some of the tables in my db to accomodate some
greater flexibility in the application that uses it and because of this
i need to go through and update all the records. i've done one table by
hand and it had about 100 records and took about 20 minutes. but this
next table
Select count(distinct(field)) from table where field = 0 ?
-Original Message-
From: Laercio Xisto Braga Cavalcanti
[mailto:[EMAIL PROTECTED]
Sent: Monday, May 24, 2004 11:18 PM
To: 'John Nichel'; 'MySQL List'
Subject: RE: Query question
You can do:
Select count(distinct(field)) from
Hi,
I have a table which I want to select data from (obiviously). In
this table, I have a field which is an integer, and defaults to 0. What
I would like to do is count all rows in that table which not only equals
0 for the field, but has a distinct value which is greater than 0.
id
At 12:36 PM 5/24/2004, you wrote:
Hi,
I have a table which I want to select data from (obiviously). In this
table, I have a field which is an integer, and defaults to 0. What I
would like to do is count all rows in that table which not only equals 0
for the field, but has a distinct value
Rich Allen wrote:
iH
this should work
test select * from xt;
++---+
| id | field |
++---+
| 1 | 0 |
| 2 | 0 |
| 3 | 7 |
| 4 | 8 |
| 5 | 7 |
| 6 | 0 |
| 7 | 6 |
| 8 | 7 |
| 9 | 8 |
++---+
9 rows in set (0.00 sec)
test select
You can do:
Select count(distinct(field)) from table where field 0
Laercio.
-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: segunda-feira, 24 de maio de 2004 14:37
To: MySQL List
Subject: Query question
Hi,
I have a table which I want to select data from
On Mon, 2004-05-24 at 11:32, John Nichel wrote:
Rich Allen wrote:
iH
this should work
test select * from xt;
++---+
| id | field |
++---+
| 1 | 0 |
| 2 | 0 |
| 3 | 7 |
| 4 | 8 |
| 5 | 7 |
| 6 | 0 |
| 7 | 6 |
| 8
Garth, good catch!
- hcir
mysql
- hcir
On May 24, 2004, at 1:05 PM, Garth Webb wrote:
On Mon, 2004-05-24 at 11:32, John Nichel wrote:
Rich Allen wrote:
iH
this should work
test select * from xt;
++---+
| id | field |
++---+
| 1 | 0 |
| 2 | 0 |
| 3 | 7 |
| 4 | 8
iH
this should work
test select * from xt;
++---+
| id | field |
++---+
| 1 | 0 |
| 2 | 0 |
| 3 | 7 |
| 4 | 8 |
| 5 | 7 |
| 6 | 0 |
| 7 | 6 |
| 8 | 7 |
| 9 | 8 |
++---+
9 rows in set (0.00 sec)
test select count(distinct(field))
John
Try
select field, count(*)
from db.table
group by field;
David
-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Monday, May 24, 2004 10:37 AM
To: MySQL List
Subject: Query question
Hi,
I have a table which I want to select data from
I'm trying to select specified data from a field in a table.
The field from which the data has to come contains the following:
'something;else;anything;everything;name;my' (and so on), it's a long text.
I need in the case just 'my' from the field, thus between the ';'. This
time there are only
On 21-Apr-2004 Alex croes wrote:
I'm trying to select specified data from a field in a table.
The field from which the data has to come contains the following:
'something;else;anything;everything;name;my' (and so on), it's a long
text.
I need in the case just 'my' from the field, thus
Ben Dinnerville wrote:
You have a redundant clause in your query - the distinct is not needed when
you are doing a group by on the same field ('Call Svr Tag ID') - not sure
how the optimiser in MySQL will handle this. In some RDBMS's the duplicate
clause will be optimised down to 1 clause, so you
The indexes were listed at the bottom of the original post.
Woops, didnt see that far down, should have scrolled a little further :)
What is needed, I expect, is a
multi-column index on those 2 columns:
ALTER TABLE 31909_859552
ADD INDEX Tag_Created (`Call Svc Tag ID`, `Journal Create
Ben,
- Original Message -
From: Ben Dinnerville
Sent: Monday, April 19, 2004 1:49 AM
Subject: RE: Slow Query Question - Need help of Gurus.
snip
Then try again:
SELECT `Call Svc Tag ID`,
Count(*) as counter,
`Journal Create Date`
FROM 31909_859552
WHERE
Ben Dinnerville wrote:
snip
Note that sorting by the count can't use an index, so it will be slower
than if you had ordered by `Call Svc Tag ID`.
This is something that will need testing. Ordering on a varchar(255) column
(call svc tag ID) is going to be a lot more inefficient than ordering on
]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Slow Query Question - Need help of Gurus.
Importance: High
Hi All,
I have a huge Database which contains about 500,000 records, (will be
adding about 20-25k records every week)
I need to run group queries and output the same to a web interface
Hello
i have a simple query
select u.*,p.* from users u, profiles p
where u.uname = p.uname
and u.level != 0
Is there any tricks to make this use an index. If i do level=0 is uses an
index , but != does not.
--
MySQL General Mailing List
For list archives:
The you will need to use the second format.
DATE_FORMAT(queue_time, '%Y%m%d') = CURRENT_DATE()
-Original Message-
From: Dirk Bremer (NISC)
To: [EMAIL PROTECTED]
Sent: 4/16/04 4:09 PM
Subject: Re: SQL Query Question
- Original Message -
From: Victor Pendleton [EMAIL PROTECTED
i have a simple query
select u.*,p.* from users u, profiles p
where u.uname = p.uname
and u.level != 0
Is there any tricks to make this use an index. If i do level=0 is uses an
index , but != does not.
MySQL only uses an index if it will return less than approx. 30% of the
records. It
If you do any math on your column, no index on the column can be used. If
possible, you should always try to write your condition so that the
calculations are done on the value(s) to compare to, not on the column. So,
assuming you have no rows with future timestamps, something like this
Hi All,
I have a huge Database which contains about 500,000 records, (will be
adding about 20-25k records every week)
I need to run group queries and output the same to a web interface.
An example is:
SELECT DISTINCT(`Call Svc Tag ID`),Count(`Call Svc Tag ID`) as counter,
`Journal Create Date`
I have a simple table where one of the columns is named queue_time and is
defined as a timestamp-type. I would like to query this table for all rows
where the queue_time equals the current date. I an a newbie and have been
wrestling with the docs for a solution. You help will be appreciated.
Dirk
Query Question
I have a simple table where one of the columns is named queue_time and is
defined as a timestamp-type. I would like to query this table for all rows
where the queue_time equals the current date. I an a newbie and have been
wrestling with the docs for a solution. You help
WHERE queue_time = Now() + 0
Are you wanting just the date or the datetime?
-Original Message-
From: Dirk Bremer (NISC)
To: [EMAIL PROTECTED]
Sent: 4/16/04 2:54 PM
Subject: SQL Query Question
I have a simple table where one of the columns is named queue_time and
is
defined as a timestamp
- Original Message -
From: Victor Pendleton [EMAIL PROTECTED]
To: 'Dirk Bremer (NISC) ' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, April 16, 2004 15:06
Subject: RE: SQL Query Question
WHERE queue_time = Now() + 0
Are you wanting just the date or the datetime?
-Original
%m%d') = CURRENT_DATE() + 0
...no index usage though
-Original Message-
From: Dirk Bremer (NISC)
To: [EMAIL PROTECTED]
Sent: 4/16/04 3:25 PM
Subject: Re: SQL Query Question
- Original Message -
From: Victor Pendleton [EMAIL PROTECTED]
To: 'Dirk Bremer (NISC) ' [EMAIL PROTECTED
- Original Message -
From: Victor Pendleton [EMAIL PROTECTED]
To: 'Dirk Bremer (NISC) ' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, April 16, 2004 15:57
Subject: RE: SQL Query Question
If your data is stored in the following format
2004-04-16 00:00:00
you can do WHERE
On Fri, 2004-04-16 at 14:09, Dirk Bremer (NISC) wrote:
- Original Message -
From: Victor Pendleton [EMAIL PROTECTED]
To: 'Dirk Bremer (NISC) ' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, April 16, 2004 15:57
Subject: RE: SQL Query Question
If your data is stored
Hi,
I am wondering if this is possible:
Say I have a table with 2 columns, Column_Count and Column_TotalCount;
Is it possible to use a query to select all rows from the table where Column_Count is
greater than Column_TotalCount?
Like this:
SELECT * FROM mytable WHERE Column_Count
Hello,
Friday, April 16, 2004, 12:50:21 AM, you wrote:
M Is it possible to use a query to select all rows from the table
M where Column_Count is greater than Column_TotalCount?
M Like this:
M SELECT * FROM mytable WHERE Column_Count Column_TotalCount;
Perhaps you ought to try it before
I did try it, and it doesn't work, I was looking for Ideas that will work.
Hello,
Friday, April 16, 2004, 12:50:21 AM, you wrote:
M Is it possible to use a query to select all rows from the table
M where Column_Count is greater than Column_TotalCount?
M Like this:
M SELECT * FROM
Hello,
Friday, April 16, 2004, 12:56:32 AM, you wrote:
M I did try it, and it doesn't work, I was looking for Ideas that will work.
Obviously not, because that's exactly how you do it.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
MySQL General Mailing List
At 16:56 -0700 4/15/04, MYSQL wrote:
I did try it, and it doesn't work, I was looking for Ideas that will work.
Looks to me like it should work. Try this and see what you get:
SELECT Column_Count, Column_TotalCount, Column_Count ColumnTotalCount
FROM mytable;
That'll show you what's in the
It should work if both columns are numerical. Say int, decimal, float,
double and so on.
Babs
-Ursprüngliche Nachricht-
Von: MYSQL [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 16. April 2004 01:50
An: mysql
Betreff: Query Question
Hi,
I am wondering if this is possible:
Say I have
Manuele wrote:
This might sound silly to many... so sorry in advance...
in mysql4
Suppose I have 2 tables:
tableA has 3 columns, 2 of them reference the same column of tableB
Example:
TableA (Items)
Id - FirstType - SecondType
0 - 1 - NULL
1 - 2 - 3
(',', Column, ',') LIKE '%,2,%'
to search for rows that contain 2.
Hope that helps.
Matt
- Original Message -
From: award
Sent: Saturday, March 13, 2004 2:16 PM
Subject: query question using REGEXP
Hi,
I'm storing in a database numbers separated by comma if more than one
number i.e
Record
JR Bullington [EMAIL PROTECTED] wrote:
This is for those who love a challenge.
I am trying to come up with a query that would calculate the Standard
Deviation and Variance for 15 fields. Although in theory this is easily done
in Access, MySQL does not have the same mathematical calculations
This is for those who love a challenge.
I am trying to come up with a query that would calculate the Standard
Deviation and Variance for 15 fields. Although in theory this is easily done
in Access, MySQL does not have the same mathematical calculations that
Access/SQL does.
Here is the query as
This might sound silly to many... so sorry in advance...
in mysql4
Suppose I have 2 tables:
tableA has 3 columns, 2 of them reference the same column of tableB
Example:
TableA (Items)
Id - FirstType - SecondType
0 - 1 - NULL
1 - 2 - 3
TableB (Types)
Id
201 - 300 of 494 matches
Mail list logo