Joining tables from different Instances

2011-05-25 Thread 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. I want to join the table_1a with table_2b. Is is possible?

Re: Joining tables from different Instances

2011-05-25 Thread Reindl Harald
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. I want to

Re: Joining tables from different Instances

2011-05-25 Thread Rik Wasmus
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 to join the

joining tables

2006-08-10 Thread Reinhart Viane
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

Re: joining tables

2006-08-10 Thread Peter Brawley
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

Re: Joining tables, duplicating none

2005-10-10 Thread Joerg Bruehe
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'

Re: Joining tables, duplicating none

2005-10-08 Thread Gleb Paharenko
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 RIGHT

Joining tables, duplicating none

2005-10-07 Thread Jonathan Mangin
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';

Re: Joining tables, duplicating none

2005-10-07 Thread SGreen
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.date between

Re: Joining tables, duplicating none

2005-10-07 Thread Peter Brawley
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 join

Re: Joining tables, duplicating none

2005-10-07 Thread Jonathan Mangin
- Original Message - From: [EMAIL PROTECTED] To: Jonathan Mangin [EMAIL PROTECTED] Cc: mysql@lists.mysql.com 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 PM: I have two tables

Re: Joining tables, duplicating none

2005-10-07 Thread SGreen
Jonathan Mangin [EMAIL PROTECTED] wrote on 10/07/2005 03:47:48 PM: - Original Message - From: [EMAIL PROTECTED] To: Jonathan Mangin [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Friday, October 07, 2005 2:09 PM Subject: Re: Joining tables, duplicating none Jonathan

Joining tables - restricting selected records

2005-06-28 Thread Russell Horn
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

Re: Joining tables - restricting selected records

2005-06-28 Thread Mathias
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

Re: Joining tables - restricting selected records

2005-06-28 Thread Michael Stassen
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

Re: Joining tables - restricting selected records

2005-06-28 Thread Mathias
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 purchases: purchaseID

Re: Joining tables - restricting selected records

2005-06-28 Thread Michael Stassen
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

Re: help joining tables in a query

2005-06-16 Thread Danny Stolle
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 many

help joining tables in a query

2005-06-15 Thread James M. Gonzalez
Greetings, I'm facing a difficult query at the moment. I have tried many different queries but still not get the desired result. My case: Tables: shipped ( id, shipdate, sn); undelivered (id, undate, sn); return (id, redate, sn); I need the following output: DATE

Performance of Joining Tables From Different Storage Engines -- Re: MyISAM vs. InnoDB for heavily-indexed, read-mostly data

2004-12-21 Thread Homam S.A.
Thanks Mike for 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 updates whatsoever. However, I will be

Re: Performance of Joining Tables From Different Storage Engines -- Re: MyISAM vs. InnoDB for heavily-indexed, read-mostly data

2004-12-21 Thread mos
At 04:00 PM 12/21/2004, Homam S.A. wrote: Thanks Mike for 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

Re: Performance of Joining Tables From Different Storage Engines -- Re: MyISAM vs. InnoDB for heavily-indexed, read-mostly data

2004-12-21 Thread Homam S.A.
Thanks Mike. I think testing ultimately determines how efficient heterogeneous engine joins are. I just wanted to know if someone had issues with them in a heavy-load environment. --- mos [EMAIL PROTECTED] wrote: At 04:00 PM 12/21/2004, Homam S.A. wrote: Thanks Mike for the information. Yes,

Dumb question (joining tables)

2004-06-17 Thread
I have large fact table, in which there are much ids (that are in fact foreign keys but as long as I use MyISAM engine them are not technically). So when I try to join another table (that contains text descriptions for each id from one of fact columns, so it has two fields (id (PK) and name)) in

Re: Dumb question (joining tables)

2004-06-17 Thread gerald_clark
wrote: I have large fact table, in which there are much ids (that are in fact foreign keys but as long as I use MyISAM engine them are not technically). So when I try to join another table (that contains text descriptions for each id from one of fact columns, so it has two fields (id (PK) and

SELECTing most recent date and JOINing tables

2003-10-14 Thread Dusty Kleyboecker
I have two tables, a PROJECTS table and a COMMENTS table linked by seq in a one to many relationship. In other words, there might be several comment rows for the same project, with different dates. PROJECTS seq name startdate enddate 1 p1 02032002 12202003 2 p2 04012003

Re: SELECTing most recent date and JOINing tables

2003-10-14 Thread Roger Baklund
* Dusty Kleyboecker I have two tables, a PROJECTS table and a COMMENTS table linked by seq in a one to many relationship. In other words, there might be several comment rows for the same project, with different dates. PROJECTS seq name startdate enddate 1 p1 02032002

Joining tables from two different databases

2003-09-15 Thread Jeff McKeon
I have an existing database with a lot of information, I need to create a new database to record inventory information that pertains to records in the first database. I'd like to keep these two database's separate. Is it possible to relate a record in one database to a record in another and do

Re: Joining tables from two different databases

2003-09-15 Thread Joseph Bueno
Jeff McKeon wrote: I have an existing database with a lot of information, I need to create a new database to record inventory information that pertains to records in the first database. I'd like to keep these two database's separate. Is it possible to relate a record in one database to a record

Re: Joining tables from two different databases

2003-09-15 Thread Kelley Lingerfelt
I do it everyday, they are on the same machine and installation, but most of my queries span 2 to 4 databases. I can't get it it work on ODBC queries though, but PHP does it fine and so does the mysql command line. But I would be interested to know if there is any problems or reason not to do

Re: Joining tables from two different databases

2003-09-15 Thread Tbird67ForSale
In a message dated 9/15/03 9:50:22 AM Eastern Daylight Time, [EMAIL PROTECTED] writes: Jeff McKeon wrote: Is it possible to relate a record in one database to a record in another and do queries that pull from both databases? Programmatically yes. Using referential integrity (foreign

RE: Joining tables from two different databases

2003-09-15 Thread Jeff McKeon
That's what I thought. Thanks for the advise!! :o) Jeff -Original Message- From: Joseph Bueno [mailto:[EMAIL PROTECTED] Sent: Monday, September 15, 2003 9:26 AM To: Jeff McKeon Cc: [EMAIL PROTECTED] Subject: Re: Joining tables from two different databases Jeff McKeon wrote

Troubles with joining tables

2003-03-02 Thread Seth Price
Hi list, I am sure that there is an efficient way to do this in SQL, I just can't figure out what it is. I am dealing with two tables. One, I'll call table1 has about 90 columns and 20k rows, each number in column xy is unique. The other has about 90 columns and about 200k rows, and there will

Troubles with joining tables (cont)

2003-03-02 Thread Seth Price
Since writing this message, I have discovered another possible way for doing this with two successive SQL statements. It would look something like this: 1) CREATE TEMPORARY TABLE temp SELECT DISTINCT xy FROM table2 WHERE all of table2 conditions; (going by data below, maximum of 20k rows

Re: Troubles with joining tables

2003-03-02 Thread Bruce Feist
Seth Price wrote: I am dealing with two tables. One, I'll call table1 has about 90 columns and 20k rows, each number in column xy is unique. The other has about 90 columns and about 200k rows, and there will be around 10 duplicate entries in xy for each value of xy. So, if I SELECT a given

Re: Troubles with joining tables (cont)

2003-03-02 Thread Bruce Feist
Seth Price wrote: Since writing this message, I have discovered another possible way for doing this with two successive SQL statements. It would look something like this: 1) CREATE TEMPORARY TABLE temp SELECT DISTINCT xy FROM table2 WHERE all of table2 conditions; (going by data below,

Re: Troubles with joining tables

2003-03-02 Thread Seth Price
I'd better ask the obvious question... *which* one? Is there one in particular that you're after, or would you be equally happy with any of them? The latter would be a bit odd. Each row in table1 has several corresponding rows in table2. Any of them that match the query would be good. So the

Re: Troubles with joining tables

2003-03-02 Thread Bruce Feist
Seth Price wrote: Wouldn't you get the same result from your query by using an INNER JOIN and dropping the temp.xy IS NOT NULL clause? I am not sure, that is why I am asking y'all. My only problem with that is does INNER JOIN create a 200k table with 180 columns and do the selection from that?

Re: Multi-table Join (WAS: Is there Examples and Documents on joining tables?)

2002-10-04 Thread Roger Baklund
* Michael T. Babcock Its well appreciated to see examples of what works and what doesn't too; its nice to know how to get one's queries in an order that makes the MySQL optimizer's life easier. I'm trying to decide if there's some logical way to inform MySQL that it can reorder a series of

Re: Is there Examples and Documents on joining tables?

2002-10-04 Thread John Ragan
right. corereader is designed to query all platforms from an ms. windows frontend. Thanks John, I looked through your web site, it seems to me that corereader is microsoft based product. I'm on Linux RedHat 7.2. thanks [EMAIL PROTECTED] wrote: corereader will help you

Re: Is there Examples and Documents on joining tables?

2002-10-04 Thread John Ragan
right. it also won't run on mainframes. :) corereader is designed to query all platforms from an ms. windows frontend. Thanks John, I looked through your web site, it seems to me that corereader is microsoft based product. I'm on Linux RedHat 7.2. thanks [EMAIL PROTECTED]

Is there Examples and Documents on joining tables?

2002-10-03 Thread damovand
Is there a document that compiles examples on different ways of joining two or more tables? I found a few on http://www.mysql.com/doc/en/JOIN.html but they do not cover joining more than two tables. Thanks for any suggestions.

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread Josh Trutwin
Is there a document that compiles examples on different ways of joining two or more tables? I found a few on http://www.mysql.com/doc/en/JOIN.html but they do not cover joining more than two tables. Thanks for any suggestions. I wish there were more examples as well! I use this for

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread damovand
- Original Message - From: damovand [EMAIL PROTECTED] To: mysql [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 12:31 PM Subject: Is there Examples and Documents on joining tables? Is there a document that compiles examples on different ways of joining two or more tables? I found a few

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread John Ragan
corereader will help you do a pointclick join of up to four tables. you can operate corereader without it, but reading the documentation is strongly recommended. Is there a document that compiles examples on different ways of joining two or more tables? I found a few on

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread Arthur Fuller
within it). Then you can inspect the code it writes and tweak it to suit using EXPLAIN. hth, Arthur - Original Message - From: damovand [EMAIL PROTECTED] To: mysql [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 12:31 PM Subject: Is there Examples and Documents on joining tables

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread Arthur Fuller
PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 3:57 PM Subject: Re: Is there Examples and Documents on joining tables? Is there a document that compiles examples on different ways of joining two or more tables? I found a few on http://www.mysql.com/doc/en/JOIN.html

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread Josh Trutwin
Josh Trutwin wrote: SELECT table1.bunch, table2.of, table3.stuff FROM table1 INNER JOIN table2 ON table2.some_id INNER JOIN table3 ON table3.some_id WHERE table1.some_id = table2.some_id AND table1.some_id = table3.some_id; Your where is sort of in the wrong place ... SELECT

Multi-table Join (WAS: Is there Examples and Documents on joining tables?)

2002-10-03 Thread Josh Trutwin
Here is the query that I had in a PhP script that joins a bunch of tables (I'll try to make this look readable). If you're curious, it's for a motorcross site (www.springcreekmx.com): SELECT standings.rank, race.race_date, class.class_name, racer.racer_name, cycle.cycle_desc,

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread damovand
Thanks John, I looked through your web site, it seems to me that corereader is microsoft based product. I'm on Linux RedHat 7.2. thanks [EMAIL PROTECTED] wrote: corereader will help you do a pointclick join of up to four tables. you can operate corereader without it, but reading

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread Arthur Fuller
: Thursday, October 03, 2002 8:08 PM Subject: Re: Is there Examples and Documents on joining tables? Hi Arthur, Thanks for your answer and your example. Your example is very good but I can't map to what I'm trying to do. As you suggested I have to understand how inner join is implemented in MySQL

Joining Tables

2002-08-27 Thread suresh
Hi I would like to have a SQL query to couple all the five tables to accomplish my need. This is a search page and the user will be searching using the don_id Presently I am using a simple equi join which works fine if all the five tables contain data for user_id But if any of the tables have

joining tables from selected values

2002-04-01 Thread Tomas Sanchez
Hi! Id would like to have 4 tables files ( id int(8), type set(directory, file, link), ) files_directory ( id int(8), is_files int(8), name varchar(20) ... ) files_file ( id int(8), is_files int(8), name varchar(20) ... ) files_link ( id int(8), is_files int(8), name varchar(20) ... ) And

RE: simple question on joining tables

2002-02-13 Thread Todd Williamsen
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:02 AM To: [EMAIL PROTECTED] Subject: simple question on joining tables Hi everyone, I am starting my first mySQL project . I want to create 2 tables Table User : userId , FisrtName, LastNAme, Gender with userId

simple question on joining tables

2002-02-12 Thread Yaniv . Sabbah
Hi everyone, I am starting my first mySQL project . I want to create 2 tables Table User : userId , FisrtName, LastNAme, Gender with userId defined as the primary key that auto-increments I want that each time I insert a new row in this table, the field userId is inserted as well in

Re: Joining tables using IN (...) clause returns duplicate rows

2002-02-04 Thread Greg Bailey
I guess I'm a little confused about the MySQL versions. What is the real production version? If 4.0.2 can be called a production version, I'd gladly use it on my web site; however, it doesn't seem to indicate that on the MySQL home page. So if I find a bug in 3.23.47 that was fixed a long time

Re: Joining tables using IN (...) clause returns duplicate rows

2002-02-04 Thread Sasha Pachev
On Monday 04 February 2002 01:12 pm, Greg Bailey wrote: What is the real production version? ?If 4.0.2 can be called a production version, I'd gladly use it on my web site; however, it doesn't seem to indicate that on the MySQL home page. ?So if I find a bug in 3.23.47 that was fixed a long

Joining tables returns duplicated rows

2002-02-01 Thread Greg Bailey
Description: Joining multiple tables together in a select statement with where clauses using the IN (...) construct generate duplicated output rows. How-To-Repeat: 1. ==Load the following into the test_bug database: # MySQL dump 8.14 # # Host: localhostDatabase: test_bug

joining tables

2001-07-23 Thread Jeremy Morano
Hi, I would like to know how to create a field that comes from another table and how to insert values from a table into another one. kind of like this table_1 uid1 ...(primary key) first_name ... last_name ... craete table table_2 ( uid2...(primary key) phone... fax... table_1.uid1 ...);

Re: joining tables

2001-07-23 Thread Paul DuBois
At 11:57 AM -0400 7/23/01, Jeremy Morano wrote: Hi, I would like to know how to create a field that comes from another table and how to insert values from a table into another one. kind of like this table_1 uid1 ...(primary key) first_name ... last_name ... craete table table_2 (

Joining tables

2001-04-24 Thread Marc Raeymaekers
Hello, I'm a newbie with MySQL, so don't apologize me when I post a stupid question. Is it only possible to join tables 2 by 2 or is it possible to join 4 tables in only one request? Thanks Marc Raeymaekers Belgium - Before

Re: Joining tables

2001-04-24 Thread Steve Werby
Marc Raeymaekers [EMAIL PROTECTED] wrote: I'm a newbie with MySQL, so don't apologize me when I post a stupid question. Is it only possible to join tables 2 by 2 or is it possible to join 4 tables in only one request? Yes, you can join 4 tables in one SQL statement. -- Steve Werby

JOINing Tables Across MySql Servers

2001-02-18 Thread Jay Habegger
MySql Experts: I have a mysql server running on host A with database X and a mysql server running on host B with database Y. In the context of a select I want to JOIN a table in database X on host A with a table in database Y on host B. Can this be done? Do I have to do anything special with

Re: JOINing Tables Across MySql Servers

2001-02-18 Thread Paul DuBois
On Sun, Feb 18, 2001 at 12:11:09PM -0800, Jay Habegger wrote: MySql Experts: I have a mysql server running on host A with database X and a mysql server running on host B with database Y. In the context of a select I want to JOIN a table in database X on host A with a table in