On 2011-05-25 13:50:32 Ramesh wrote:
> I have a different schemas in different instances.
>
> I would like to join the tables in different instances for the required
> result.
>
> Is it possible?
>
> Example
> =
>
> Server I - table_1a, table_2b
> Server II - table_2a,table_2b.
>
> I want
Am 25.05.2011 13:50, schrieb Ramesh:
> Hi
>
> I have a different schemas in different instances.
>
> I would like to join the tables in different instances for the required
> result.
>
> Is it possible?
>
> Example
> =
>
> Server I - table_1a, table_2b
> Server II - table_2a,table_2b.
>
Hi
I have a different schemas in different instances.
I would like to join the tables in different instances for the required
result.
Is it possible?
Example
=
Server I - table_1a, table_2b
Server II - table_2a,table_2b.
I want to join the table_1a with table_2b.
Is is possible?
John,
What's happening is that the tables do not have a one-to-one
relationship, so the JOIN duplicates rows from Orders to match the
rows in Lineitems. You need to ensure the aggregation is consistent
across the two datasets. Try this:
SELECT
Sum(a.ordertotal) as total,
line_item
Hi,
The function is probably behaving as intended, but its confusing the
hell out of me. ;) Anyway, say I have two tables; orders and lineitems
Orders has two columns: orderid(primary key) and ordertotal
Lineitems has two columns: orderid and itemid
For every orderid in the orders table, the
Darn, it's not working after all.
SELECT
people.*,
COUNT ( DISTINCT cars.car_id ) AS car_count,
COUNT ( DISTINCT pets.pet_id ) AS pet_count,
SUM ( IF ( pets.date_bought > NOW() - INTERVAL 7 DAY, 1, 0 ) ) AS
new_pet_count
WHERE...etc
car_count and pet_count are calculating correctly, but new_p
Yes, I don't see why that wouldn't work...
On Mon, Nov 2, 2009 at 11:09 AM, Brian Dunning wrote:
> Johnny - Your solution might actually help me solve my next step, which is
> to also return a count of pets bought only within the last 7 days. Something
> like this:
>
>
>
>> SELECT people.*,
>>
Johnny - Your solution might actually help me solve my next step,
which is to also return a count of pets bought only within the last 7
days. Something like this:
SELECT people.*,
SUM(IF(cars.id IS NULL,0,1)) AS car_count,
SUM(IF(pets.id IS NULL,0,1)) AS pet_count,
SUM ( IF ( pets.d
Thanks, this solved it!
On Nov 2, 2009, at 12:37 AM, Michael Dykman wrote:
I suspect 'distinct' might help you out here.
SELECT
people.*,
count(distinct cars.car_id) as car_count,
count(distinct pets.pet_id) as pet_count
--
MySQL General Mailing List
For list archives: htt
You are asking for all records form all tables. So, If 1 person has 1 car
and 1 pet, there will be 2 records returned for that 1 person.
You'll need to use SUM() instead of COUNT():
SELECT people.*,
SUM(IF(cars.id IS NULL,0,1)) AS car_count,
SUM(IF(pets.id IS NULL,0,1)) AS pet_count,
Ma
Hi all -
I have a table of PEOPLE, and a table of CARS owned by various people,
and a table of PETS owned by various people. Each person may have 0 or
more pets, and each person may have 0 or more cars. I'm trying to
return a list of all the people, showing how many pets each person
has,
> I'm using MySQL 5.1.30 and have several memory tables with indexes on the
> appropriate columns. When I try and join 2 particular memory tables together
> to get 5k rows, it takes 90 seconds.
> This is incredibly slow considering table1 has 11k rows and table2 has 5k
> rows. A table join like thi
Memory tables use hash indexes by default instead of b-tree. Try
changing the index, that should help significantly.
regards,
Walter
On Tue, Mar 31, 2009 at 6:47 PM, mos wrote:
> I'm using MySQL 5.1.30 and have several memory tables with indexes on the
> appropriate columns. When I try and join
I'm using MySQL 5.1.30 and have several memory tables with indexes on the
appropriate columns. When I try and join 2 particular memory tables
together to get 5k rows, it takes 90 seconds.
This is incredibly slow considering table1 has 11k rows and table2 has 5k
rows. A table join like this shoul
mrc_titles is a temp table?
On Wed, Oct 15, 2008 at 11:59 PM, Jerry Schwartz <[EMAIL PROTECTED]
> wrote:
> I tried to make a query that joins to subqueries:
>
>
>
> SELECT discontinued.b
>
> FROM
>
> (SELECT mrc_titles.title AS a
>
> FROM mrc_titles JOIN prod ON mrc_titles.tit
I tried to make a query that joins to subqueries:
SELECT discontinued.b
FROM
(SELECT mrc_titles.title AS a
FROM mrc_titles JOIN prod ON mrc_titles.title = prod.prod_title
JOIN pub ON prod.pub_id = pub.pub_id
WHERE pub.pub_code = "MRC"
I think you have just got your table names confused. Try this one
SELECT
cats.CatId,
cats.cat As cat,
cats1.catid AS catid1,
cats1.cat As cat1,
cats2.catid AS catid2,
cats2.cat AS cat2,
cats3.catid AS catid3,
cats3.cat AS cat3
FROM
vb_ldcats as cats
LEFT JOIN vb_ldcats As cats1
Thanks Shannon. :)
-Original Message-
From: Shannon Wade [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2008 4:04 PM
To: Jim MacDiarmid
Subject: Re: Joining a table to itself
not sure i understand the order of your table joining
i just reordered them and it works.
SELECT
I'm hoping someone can help me with this. I have a table of categories that
I'm trying to join to itself, but I keep getting the error "unknown column:
Cats1.parentid in on clause".
Here is the SQL for the table:
CREATE TABLE `vb_ldcats` (
`catid`int(10) AUTO_INCREMENT NOT NULL
no that won't work, because even though the "where" excludes *my* vote
for a particular candidate, it will include everybody else's vote for
the same candidate.
the objective is: if *i* voted for john, then john should not be in
the final result set even though a million other people voted for
joh
Ok then, so
select candidate,count(*) as total from vote where (voter <> '$me' and
vote =1) group by candidate order by total
desc;
On Wed, Feb 27, 2008 at 9:37 AM, Olav Mørkrid <[EMAIL PROTECTED]>
wrote:
> hi phil, i forgot to mention one thing.
>
> the table also has a column called "vote" w
hi phil, i forgot to mention one thing.
the table also has a column called "vote" which is either 0 (no vote
given) or 1 (vote given). this column is required for other purposes.
my favorites:
select candidate from vote where voter = '$me' and vote = 1;
most popular:
select candidate from vote w
I'm confused as to why you need the subselect at all?
As it's all the same table why can't you just use
select candidate,count(*) as total from vote where voter <> '$me' group by
candidate order by total
desc;
On Wed, Feb 27, 2008 at 9:04 AM, Olav Mørkrid <[EMAIL PROTECTED]>
wrote:
> hello
>
hello
i have a table "vote" which has the columns "voter" and "candidate". i
would like to make a list of the most popular candidates *except*
those who are on my favorite list. using a sub-select, it's easy:
my favorites:
select candidate from vote where voter = '$me';
most popular:
select cand
Thanks!!
I must have a problem with my code then !! I will check it out then.
Peter Brawley a écrit :
DROP TABLE IF EXISTS messages;
CREATE TABLE messages( message text, reference char(10), sender char(10));
INSERT INTO MESSAGES VALUES
('message1 text' , '05' , 'M01'),
('messag
DROP TABLE IF EXISTS messages;
CREATE TABLE messages( message text, reference char(10), sender char(10));
INSERT INTO MESSAGES VALUES
('message1 text' , '05' , 'M01'),
('message2 text' , '10' , 'M15'),
('message3 text' , '05' , 'M04'),
('message4
Hi
My guess is I have not described my problem well enough then ...
Here is an example of table one :
MESSAGE | REFERENCE | SENDER
message1 text | 05 | M01
message2 text | 10
Richard,
This is elementary---you most definitely do not need to do it with PHP
code. Given tables messages(senderid, message, reference) and
senders(senderid, name, address), this query
SELECT m.message, m.reference, s.name
FROM messages m
JOIN senders s ON m.senderid=s.senderid
WHERE m.ref
I've tried it and it does not work,
the problem is that there needs to be 1 table1 row for each table2 row,
and table 1 is the message list and the table two is the members
information list.
So I need the same row to be joined to all the message rows with the
same senderid ...
I guess I w
That query will give one row per table1 row matching your WHERE clause,
with matched row from table2. Is that what you want?
PB
Richard wrote:
Thanks,
I think I have found the correct syntax in a book I've got :
SELECT A.message,B.name
FROM table1 A
JOIN table2 B ON A.senderid=B.senderid
WHER
Richard
>I have table1 containing : message, senderid, reference
>and table2 contains: senderid, name, address
>I want to do a query that gives me : message, reference and name ...
Do you mean ...
SELECT t1.message, t1.reference, t2.name
FROM tbl1 t1
JOIN tbl2 ON t1.senderid=t2.senderid;
PB
-
Hello, I'm not sure if I can use union here or what syntax I should use.
I will simplify the tables to only include the necessary information.
I have table1 containing : message, senderid, reference
and table2 contains: senderid, name, address
I want to do a query that gives me : message, refer
AIL PROTECTED]>
To:
Sent: Monday, December 11, 2006 8:39 PM
Subject: Prefixing fields with table name when joining?
I have three tables (x, y, and z) with the same 3 fields (id, name,
number). If I do:
SELECT * FROM x, y, z WHERE ...
each row of my result will contain 3 id fields, 3 name fiel
I have three tables (x, y, and z) with the same 3 fields (id, name,
number). If I do:
SELECT * FROM x, y, z WHERE ...
each row of my result will contain 3 id fields, 3 name fields, and 3
number fields.
Of course, I can/should do:
SELECT x.id AS x_id, x.name AS x_name, x.number AS x_number,
> -Ursprüngliche Nachricht-
> Von: Renito 73 [mailto:[EMAIL PROTECTED]
> Gesendet: Samstag, 30. September 2006 04:20
> An: mysql@lists.mysql.com
> Betreff: Joining *3* tables
>
> Hello list
Hello Mr 73,
> I have a large database of contacts, but since not
If I want to generate a report with address, company and list
(category) how can I join the three tables with a single query? or should I
first generate a temporal table with the result of the first join and then a
second one joining the third table?
Thanks for your comments
--
MySQL Gener
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)
>
> mysq
> 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 unsubscr
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:
Sent: Sunday, August 13, 2006 6:5
On Sun, 2006-08-13 at 15:53 -0700, Steffan A. Cline wrote:
> I am in a situation where I have say 1 column called "attribute" I need and
> the result set is 3 rows. i.e.
> ROW 1 - Mechanic
> ROW 2 - Carpenter
> ROW 3 - Plumber
> I want to have the rows returned as one row
> Such as
> ROW 1 Mechani
I am in a situation where I have say 1 column called "attribute" I need and
the result set is 3 rows. i.e.
ROW 1 - Mechanic
ROW 2 - Carpenter
ROW 3 - Plumber
I want to have the rows returned as one row
Such as
ROW 1 Mechanic, Carpenter, Plumber
Something like a literal join would be beautiful suc
Reinhart,
>So even the clients who have no entry in events on that day, but they have
>an event in that specific month and year should be shown with a 0 value.
Try ...FROM clients LEFT JOIN events...
PB
-
Reinhart Viane wrote:
Table1: events
Durationworkdateclientid
Table1: events
Durationworkdateclientidpersonid
60 2006-01-03 1 51
48 2006-01-03 2 51
167 2006-01-03 4 51
Table2: clients
Clientidname
1 client1
2
Ville Mattila wrote:
I try to get a list of all Invoices with total sum of the invoice and
paid sum of each invoices, as well as a customer name. I try following
query:
SELECT Invoices.*, SUM(InvoiceContents.Amount * InvoiceContents.Price)
AS InvoiceTotal, Customers.Name, SUM(Payments.Amount) Pa
Ville,
>SELECT Invoices.*, SUM(InvoiceContents.Amount * InvoiceContents.Price)
>AS InvoiceTotal, Customers.Name, SUM(Payments.Amount) PaidTotal,
>MAX(Payments.Date) LastPayment FROM Invoices LEFT JOIN InvoiceContents
>ON (InvoiceContents.InvoiceID = Invoices.ID) LEFT JOIN Customers ON
>(Customers
Hello all,
I'm sure that this situation is one of the most wondered questions with
JOIN clauses. Anyway, I couldn't find any clear information how to carry
out multiple joins in one query with proper results.
I have four tables:
1. Invoices
2. InvoiceContents
3. Customers
4. Payments
I try to ge
Phil Robbins wrote:
I've read the notice AND tried to unsubscribe TWICE. I still get the
mail.
Did you get an unsubscription confirmation email? I'm not sure if the
mysql list sends one of these or not. If it does, you have to do what it
says in the confirmation before you are unsubscribed.
At 11:55 am +1200 26/5/06, Phil Robbins wrote:
>I've read the notice AND tried to unsubscribe TWICE. I still get the mail.
http://lists.mysql.com/troubleshoot.php
HTH,
James Harvard
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mys
I've read the notice AND tried to unsubscribe TWICE. I still get the mail.
++
Phil Robbins
Auckland
New Zealand
++
_
Need more speed? Get Xtra Broadband @
http://jetstream.xtra.co.nz/chm/0,,202853
There may be a clue at the bottom of every message ;-)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http
Phil Robbins wrote:
Perhaps you should read the notice at the bottom of each post that you
receive from the list !!!
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
ema
++
Phil Robbins
Auckland
New Zealand
++
_
Discover fun and games at @ http://xtramsn.co.nz/kids
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
Amy,
You didn't mention what the problem is with your query...
select reference.uid
from reference, subject_name, ref_cat
where subject_name.sub_id = '45'
and ref_cat.ref_cat_id = '3'
and ref_cat.ref_cat_id = reference.ref_cat_id
and subject_name.sub_id = ref_cat.sub_id
IAC it is easier to unde
On Tue, 14 Feb 2006, Amy Thornton wrote:
> I am trying to join 3 tables together.
>
> Table A has 3 fields: sub_id, subject, id
> Table B has 3 fields: ref_cat_id, sub_id, ref_cat
> Table C has 7 fields: uid, ref_cat_id, etc.
>
> I am trying to join Table A and B over sub_id and join B and C over
I am trying to join 3 tables together.
Table A has 3 fields: sub_id, subject, id
Table B has 3 fields: ref_cat_id, sub_id, ref_cat
Table C has 7 fields: uid, ref_cat_id, etc.
I am trying to join Table A and B over sub_id and join B and C over ref_cat_id
while pulling in the value of sub_id and r
Solved.
Thanks.
-Mensagem original-
De: pedro mpa [mailto:[EMAIL PROTECTED]
Enviada: domingo, 29 de Janeiro de 2006 18:25
Para: mysql@lists.mysql.com
Assunto: Help on query joining a 3rd table
Hello!
I am building a query to get a monthly total for receipts and receipts plus
TAX.
My
Hello!
I am building a query to get a monthly total for receipts and receipts plus
TAX.
My problem is the TAX, it can be different for each receipt.
I need help on including and relating each TAX value/id with each receipt,
like receipt_items.price * 1.21 etc.
The tables are like the following ex
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Rhino" <[EMAIL PROTECTED]>
Cc: "Imran" <[EMAIL PROTECTED]>;
Sent: Wednesday, January 18, 2006 5:07 PM
Subject: Re: Help in joining three tables
"Rhino" <[EMAIL PROTECTED]> wrot
"Rhino" <[EMAIL PROTECTED]> wrote on 01/18/2006 03:30:44 PM:
>
> - Original Message -
> From: "Imran" <[EMAIL PROTECTED]>
> To:
> Sent: Wednesday, January 18, 2006 3:13 PM
> Subject: Help in joining three tables
>
>
> > He
- Original Message -
From: "Imran" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, January 18, 2006 3:13 PM
Subject: Help in joining three tables
Hello All:
I need to join three tables but I am not sure how to structure the query.
I need to join table1 to table2 and the
Please do not hijack someone elses thread.
]Imran wrote:
Hello All:
I need to join three tables but I am not sure how to structure the query.
I need to join table1 to table2 and then join table3 to this result set.
So like (table1 join table2) join table3.
Table1 and Table2 will be joined o
"Imran" <[EMAIL PROTECTED]> wrote on 01/18/2006 03:13:08 PM:
> Hello All:
>
> I need to join three tables but I am not sure how to structure the
query.
> I need to join table1 to table2 and then join table3 to this result set.
>
> So like (table1 join table2) join table3.
>
> Table1 and Table
Hello All:
I need to join three tables but I am not sure how to structure the query.
I need to join table1 to table2 and then join table3 to this result set.
So like (table1 join table2) join table3.
Table1 and Table2 will be joined on ProdNo,CustNo and Branch. Table3 will be
joined to the resu
Hi Jonathan, all!
Jonathan Mangin wrote:
I have two tables with date and uid cols. in common.
Table 1 has one row per date, Table 2 has a maximum
of 7 rows per date.
select t1.date, t1.val, t2.val from t1
right join t2 on t1.date = t2.date
where t1.date between '2005-08-01' and '2005-08-14'
an
Hello.
> select t1.date, t1.val, t2.val from t1
> right join t2 on t1.date = t2.date
> where t1.date between '2005-08-01' and '2005-08-14'
> and t1.uid = 'me';
Maybe it is better to move a condition on t1 fields from
WHERE to ON part of the query? Or I don't see any sense
in using a RIGH
"Jonathan Mangin" <[EMAIL PROTECTED]> wrote on 10/07/2005 03:47:48
PM:
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "Jonathan Mangin" <[EMAIL PROTECTED]>
> Cc:
> Sent: Friday, October 07, 2005 2:09 PM
> Subjec
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Jonathan Mangin" <[EMAIL PROTECTED]>
Cc:
Sent: Friday, October 07, 2005 2:09 PM
Subject: Re: Joining tables, duplicating none
"Jonathan Mangin" <[EMAIL PROTECTED]> wrote on 10/07/2005 02:57:28
Jonathan,
>I have two tables with date and uid cols. in common.
>Table 1 has one row per date, Table 2 has a maximum
>of 7 rows per date.
>select t1.date, t1.val, t2.val from t1
>right join t2 on t1.date = t2.date
>where t1.date between '2005-08-01' and '2005-08-14'
>and t1.uid = 'me';
A right
"Jonathan Mangin" <[EMAIL PROTECTED]> wrote on 10/07/2005 02:57:28
PM:
> I have two tables with date and uid cols. in common.
> Table 1 has one row per date, Table 2 has a maximum
> of 7 rows per date.
>
> select t1.date, t1.val, t2.val from t1
> right join t2 on t1.date = t2.date
> where t1.dat
I have two tables with date and uid cols. in common.
Table 1 has one row per date, Table 2 has a maximum
of 7 rows per date.
select t1.date, t1.val, t2.val from t1
right join t2 on t1.date = t2.date
where t1.date between '2005-08-01' and '2005-08-14'
and t1.uid = 'me';
+-
Anthony Brown wrote:
I have one database that I would like to split into two..
Well actually my client does.. I don't think we should.
But, is there a way to join data from the seperated databases?
One table authors will be connected to a table called contacts each residing
in different databas
Hi,
I have one database that I would like to split into two..
Well actually my client does.. I don't think we should.
But, is there a way to join data from the seperated databases?
One table authors will be connected to a table called contacts each residing
in different databases on the same ser
Mathias wrote:
sorry if i wasn't clear. i mean not select puchase_date, but max(purchase_date),
i.e. use having clause.
The join field is certainly customerId, or There is not sufficient info on
tables.
Hope that helps
:o)
Mathias
How would you do that with HAVING?
I believe the subque
Selon Michael Stassen <[EMAIL PROTECTED]>:
> Mathias wrote:
>
> > Selon Russell Horn <[EMAIL PROTECTED]>:
> >
> >>This must have come up before, but I've not found it using a google
> >>search.
> >>
> >>I have two tables customer and purchases
> >>
> >>customer:
> >> customerID
> >> customerName
Mathias wrote:
Selon Russell Horn <[EMAIL PROTECTED]>:
This must have come up before, but I've not found it using a google
search.
I have two tables customer and purchases
customer:
customerID
customerName
purchases:
purchaseID
customerID
purchaseDate
purchaseValue
Is it possible in
Selon Russell Horn <[EMAIL PROTECTED]>:
> This must have come up before, but I've not found it using a google
> search.
>
> I have two tables customer and purchases
>
> customer:
> customerID
> customerName
>
> purchases:
> purchaseID
> customerID
> purchaseDate
> purchaseValue
>
> Is
This must have come up before, but I've not found it using a google
search.
I have two tables customer and purchases
customer:
customerID
customerName
purchases:
purchaseID
customerID
purchaseDate
purchaseValue
Is it possible in MySQL to join the tables so I only get the value of
t
On 6/21/05, comex wrote:
> I have a table:
> create table example(time datetime, username varchar(255));
Please tell me you didn't actualy use "time" as identifier :)
> timeusername
> 2005-06-21 15:58:02 user1
> 2005-06-21 14:58:02 user1
> 2005-06-21 11:57:51 user2
> 2005-06-21 1
> How would you like to see that information GROUPed and what does that
> grouping represent (physically). In essence, I am asking you to describe
> what information you are determining by the grouping process, what does each
> GROUP mean to you?
Grouping just means that somebody visited twice in
comex <[EMAIL PROTECTED]> wrote on 06/21/2005 12:46:00 PM:
> > Basically it boils down to the fact that with SQL you have to use
> some other way of telling
> > each group apart other than position (or interposition, as you say
> in your example). The fact
> > that you have entries in your table
> Basically it boils down to the fact that with SQL you have to use some other
> way of telling
> each group apart other than position (or interposition, as you say in your
> example). The fact
> that you have entries in your table from user1, user1, user2, user1, user2,
> user3, and user1
> doe
comex <[EMAIL PROTECTED]> wrote on 06/21/2005 11:07:35 AM:
> I have a table:
> create table example(time datetime, username varchar(255));
> timeusername
> 2005-06-21 15:58:02 user1
> 2005-06-21 14:58:02 user1
> 2005-06-21 11:57:51 user2
> 2005-06-21 10:57:51 user1
> 2005-06-2
Will this work?
GROUP BY maxtime, user
ORDER BY maxtime DESC
comex wrote:
I have a table:
create table example(time datetime, username varchar(255));
timeusername
2005-06-21 15:58:02 user1
2005-06-21 14:58:02 user1
2005-06-21 11:57:51 user2
2005-06-21 10:57:51 user1
2005-0
I have a table:
create table example(time datetime, username varchar(255));
timeusername
2005-06-21 15:58:02 user1
2005-06-21 14:58:02 user1
2005-06-21 11:57:51 user2
2005-06-21 10:57:51 user1
2005-06-21 09:57:51 user1
The query:
select COUNT(*), username, MAX(time) as max
James M. Gonzalez wrote:
-Original Message-
From: Danny Stolle [mailto:[EMAIL PROTECTED]
Sent: 15 June 2005 21:09
To: James M. Gonzalez
Subject: Re: help joining tables in a query
James M. Gonzalez wrote:
Greetings,
I'm facing a difficult query at the moment. I have tried
shipped
WHERE (YEAR(shipdate) = 2004) AND (MONTH(shipdate) = 05)
GROUP BY shipdate
ORDER BY shipdate DESC
However, joining the 3 tables and getting the right results is being a
nightmare. I have already tried different left and right joins, with no
success. Please any help, hints, or lig
Thankyou,
That worked a treat! Thankyou so very much
--
David Scott
- Original Message -
From: "Michael Stassen" <[EMAIL PROTECTED]>
To: "Critters" <[EMAIL PROTECTED]>
Cc:
Sent: Tuesday, May 17, 2005 5:01 PM
Subject: Re: A question of joining...
Critters
Critters wrote:
Hi,
I am having problems with the JOIN function.
MESSAGES
memberID_1, memberID_2, Message
MEMBERS
id, name
I can only manage to replace the "memberID_1" in MESSAGES with the "name" in MEMBERS, I
can not replace both memberID_1 and memberID_2 with "name".
Please can someone tell me
Hi,
I am having problems with the JOIN function.
MESSAGES
memberID_1, memberID_2, Message
MEMBERS
id, name
I can only manage to replace the "memberID_1" in MESSAGES with the "name" in
MEMBERS, I can not replace both memberID_1 and memberID_2 with "name".
Please can someone tell me what I shoul
Schalk Neethling wrote:
Mathias/Everyone on the list
I am running the following query against the database:
SELECT demographic.demographic_no, demographic.first_name,
demographic.last_name, demographic.chart_no, demographic.sex,
demographic.year_of_birth, demographic.month_of_birth,
demographic.
6.col
and T1.col=T6.col
[and col='val']
Doesn't this work ? Have you an example ?
Best Regards
Mathias FATENE
Hope that helps
*This not an official mysql support answer
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED] Sent: lun
#x27;t this work ? Have you an example ?
Best Regards
Mathias FATENE
Hope that helps
*This not an official mysql support answer
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED]
Sent: lundi 25 avril 2005 00:52
To: mysql@lists.mysql.com
Subject: j
Try this
If something is numeric
SELECT * FROM table1, table2, table3, table4, table5, table6
WHERE table1.something = table2.something
AND
table1.something = table3.something
AND
table1.something = table4.something
AND
table1.something = table5.something
?
Best Regards
Mathias FATENE
Hope that helps
*This not an official mysql support answer
-Original Message-
From: Schalk Neethling [mailto:[EMAIL PROTECTED]
Sent: lundi 25 avril 2005 00:52
To: mysql@lists.mysql.com
Subject: joining six tables by mutual column
Greetings everyone.
Hope s
On Sun, April 24, 2005 3:51 pm, Schalk Neethling said:
> Hope someone can give me some pointers here. I have six tables in the
> database and I need to JOIN them on a row that appears in all of the
> tables. How do I do this? I have so far done the normal 'cross-join'
> saying SELECT * FROM table1,
Greetings everyone.
Hope someone can give me some pointers here. I have six tables in the
database and I need to JOIN them on a row that appears in all of the
tables. How do I do this? I have so far done the normal 'cross-join'
saying SELECT * FROM table1, table2, table3, table4, table5, table6
Hi,
I am working with 5.0.3 snapshot on x86_64. I am now experiencing with
features of MySQL, so please ignore that in my example I use self join .
I know that this particular example could be done much easier but
eventually I am going to join multiple tables with similar structure
(one preprocess
It's probably your JOIN on shipped items producing a cross product with
your JOIN on ordered items. What happens if you take the entire
"shippeditems" JOIN out of your statement? Are your numbers still off?
Since your query is not using data from that table you should be able to
eliminate it f
Hi there!
I have some problems with the complex MySQL join operations. In most
cases, LEFT JOIN fulfills my needs but sometimes it doesn't work in the
expected way. I'll give an example:
orders
--
- orderid
- customerid
customers
-
- id
- customername
orderitems
--
- itemid
-
the information. Yes, Emmett
> mentioned
> >the same thing in a private message, and it seems
> that
> >MyISAM is exactly what I'm looking for: a
> >heavily-indexed large table that will be also
> indexed
> >for full-text search and built off-line -- no
>
1 - 100 of 216 matches
Mail list logo