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?
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
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
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
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
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'
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
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';
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
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
- 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
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
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
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
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 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
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
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
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
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
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
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,
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
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
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
* 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
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
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
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
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
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
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
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
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
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,
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
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?
* 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
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
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 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.
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
- 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
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
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
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
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
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,
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
: 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
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
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
: [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
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
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
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
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
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 ...);
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 (
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
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
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
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
63 matches
Mail list logo