> It seems like a job for a LEFT JOIN. To see the records which
> are present in table A and not present in table B use this query:
>
> SELECT A.*
> FROM A
> LEFT JOIN B
> USING(common_field)
> WHERE B.common_field is NULL.
Thanks Jeb,
I¹ve been working with this idea thi
Hello.
> trying to write a query to find out whether there are any email
>addresses in the first table that do not have a counterpart in the >second.
It seems like a job for a LEFT JOIN. To see the records which are
present in table A and not present in table B use this query:
SELECT A.* FROM A
I still see what you want as a crosstab query. The only difference, as you
say very well, is that you want to pivot on the "date type" values and not
the ID values.
The only other thing you need to decide in order to make a crosstab report
is "what information goes in the position for the row
M ...
I did not run this vs a DB so please excuse syntax errors and if I
forgot some brackets. But in principle it should work fine.
Cheers
/rudy
-Original Message-
From: Shazia Fazili [mailto:[EMAIL PROTECTED]
Sent: maandag 14 juli 2003 19:35
To: Rudy Metzger
Subject: RE: Rows into
SELECT invoiceid,
IF(count(*)=1,sum(payment),0) pay1,
IF(count(*)=2,sum(payment),0) pay2,
IF(count(*)=3,sum(payment),0) pay3,
IF(count(*)=4,sum(payment),0) pay4,
IF(count(*)=5,sum(payment),0) pay5,
IF(count(*)=6,sum(payment),0) pay6
FROM payment
GROUP B
t, opposed to MySQL limits.
Which is nice. :)
Cheers
-
Jerry @
MetalCat.Net
-
SQL
- Original Message -
From: "MySQL List" <[EMAIL PROTECTED]>
To: "Jerry" <[EMAIL PROTECTED]>
Sent: Friday, February 14, 200
Jerry,
> Any one gone over 1000 million rows ? or any where near ?
I saw something like 4 terabytes of data in a table on this list.
Maybe I was too tired by the time I read this, or even asleep already.
As MySQL doesn't impose limits to the table size, you're in for a
fight with file size limi
> # Query_time: 17 Lock_time: 6 Rows_sent: 207550
> Rows_examined: 207550
> SELECT ID FROM sys_users;
If this is really the query that you want to do, there really isn't
much you can optimize. You're asking for every ID in the table,
so MySQL has to examine every row, and send every row.
You
On Thu, May 30, 2002 at 06:18:46PM +0200, Iago Sineiro wrote:
> Hi all.
>
> I have two questions about InnoDB table type.
>
> 1) I execute command SHOW TABLE STATUS for a table and the value for column
> Rows is different from the result of SELECT COUNT(*) for that table.
>
> mysql> SHOW TABLE
In your implementation, using limit,
LIMIT ,<# to retrieve>
so you would want $name="2,1"
-Brenden
On Sun, 2002-04-21 at 17:05, Jule Slootbeek wrote:
> Hey guys,
> I have a, for you simple, newbie question.
>
> my query is SELECT * from $TableName LIMIT $name
>
> now $name goes from 1 to 4
10 matches
Mail list logo