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

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. >

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' an

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 RIGH

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: > Sent: Friday, October 07, 2005 2:09 PM > Subjec

Re: Joining tables, duplicating none

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

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

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.dat

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 subque

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

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 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

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

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 (for

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 thi

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 in

Re: joining tables(non-equal join)

2003-09-11 Thread Bruce Feist
Dan Greene wrote: select unique t1.* from table1 as t1 left outer join table2 as t2 on t2.name = t1.name where t2.name is null That'll get the t1s not in t2, but not the other way around. Consider: SELECT t1.name, t2.name FROM table1 t1 LEFT JOIN table2 t2 ON t1.name = t2.name WHERE t2.name IS

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 "

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 ti

Re: Joining tables returns duplicated rows

2002-02-02 Thread Sinisa Milivojevic
Greg Bailey writes: > >Description: > > Joining multiple tables together in a select statement with where clauses > using the "IN (...)" construct generate duplicated output rows. Hi! I tested your case with 4.0.2 and got identical results from both queries. This was some bug probably fixed l

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 (

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 Pr

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