Re: Query across two databases on the same server

2004-03-25 Thread Ed Reed
I found the problem. There was a hyphen in my database name. Re-created
the database and re-imported my data, now everything works fine. 
 
Thanks to everyone.
 
>>> Egor Egorov <[EMAIL PROTECTED]> 3/25/04 8:19:04 AM >>>
"Ed Reed" < [EMAIL PROTECTED] > wrote:
> 
> yea, I thought it would be that easy too but it doesn't work.

It should work.

Did you get error message?

> 
> Any other ideas?
> 
>>>> "Peter Lovatt" < [EMAIL PROTECTED] > 3/24/04 3:53:03 PM >>>
> 
> select 
> db1.table.field, db2.table.field
> where 
> db1.table.someotherfield = db2.table.someotherfield
> 
> Peter
> 
>> -Original Message-----
>> From: Ed Reed [mailto:[EMAIL PROTECTED] 
>> Sent: 24 March 2004 23:45
>> To: [EMAIL PROTECTED] 
>> Subject: Query across two databases on the same server
>> 
>> 
>> Is there any way to have a single select statement that can do a
> join
>> across two databases on the same server?
>> 



-- 
For technical support contracts, goto
https://order.mysql.com/?ref=ensita 
This email is sponsored by Ensita.net http://www.ensita.net/ 
__ ___ ___  __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] 
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com 




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql 
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]





Re: Query across two databases on the same server

2004-03-25 Thread Hassan Schroeder
Ed Reed wrote:

yea, I thought it would be that easy too but it doesn't work.
Other than the fact that the given example needs a "FROM" clause,
sure it works. What exactly are you trying and what is the exact
"incorrect" result?
select 
db1.table.field, db2.table.field
  FROM db1.table, db2.table
where 
db1.table.someotherfield = db2.table.someotherfield
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Query across two databases on the same server

2004-03-25 Thread Michael Stassen
It really should be that easy, though Peter's example is missing the FROM 
clause.  I'm sure he just meant to show the syntax for db.table.column 
rather than a complete query.

Why don't you tell us what version of mysql you have, the query you tried, 
and the result you got.

Michael

Ed Reed wrote:

yea, I thought it would be that easy too but it doesn't work.
 
Any other ideas?


"Peter Lovatt" <[EMAIL PROTECTED]> 3/24/04 3:53:03 PM >>>


select 
db1.table.field, db2.table.field
where 
db1.table.someotherfield = db2.table.someotherfield

Peter


-Original Message-
From: Ed Reed [mailto:[EMAIL PROTECTED]
Sent: 24 March 2004 23:45
To: [EMAIL PROTECTED]
Subject: Query across two databases on the same server
Is there any way to have a single select statement that can do a
join

across two databases on the same server?

Thanks






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Query across two databases on the same server

2004-03-25 Thread Egor Egorov
"Ed Reed" <[EMAIL PROTECTED]> wrote:
> 
> yea, I thought it would be that easy too but it doesn't work.

It should work.

Did you get error message?

> 
> Any other ideas?
> 
>>>> "Peter Lovatt" <[EMAIL PROTECTED]> 3/24/04 3:53:03 PM >>>
> 
> select 
> db1.table.field, db2.table.field
> where 
> db1.table.someotherfield = db2.table.someotherfield
> 
> Peter
> 
>> -Original Message-
>> From: Ed Reed [mailto:[EMAIL PROTECTED]
>> Sent: 24 March 2004 23:45
>> To: [EMAIL PROTECTED]
>> Subject: Query across two databases on the same server
>> 
>> 
>> Is there any way to have a single select statement that can do a
> join
>> across two databases on the same server?
>>  



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Query across two databases on the same server

2004-03-25 Thread Ed Reed
yea, I thought it would be that easy too but it doesn't work.
 
Any other ideas?

>>> "Peter Lovatt" <[EMAIL PROTECTED]> 3/24/04 3:53:03 PM >>>

select 
db1.table.field, db2.table.field
where 
db1.table.someotherfield = db2.table.someotherfield

Peter

> -Original Message-
> From: Ed Reed [mailto:[EMAIL PROTECTED]
> Sent: 24 March 2004 23:45
> To: [EMAIL PROTECTED]
> Subject: Query across two databases on the same server
> 
> 
> Is there any way to have a single select statement that can do a
join
> across two databases on the same server?
>  
> Thanks
> 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:   
http://lists.mysql.com/[EMAIL PROTECTED]




RE: Query across two databases on the same server

2004-03-24 Thread Peter Lovatt
select 
db1.table.field, db2.table.field
where 
db1.table.someotherfield = db2.table.someotherfield

Peter

> -Original Message-
> From: Ed Reed [mailto:[EMAIL PROTECTED]
> Sent: 24 March 2004 23:45
> To: [EMAIL PROTECTED]
> Subject: Query across two databases on the same server
> 
> 
> Is there any way to have a single select statement that can do a join
> across two databases on the same server?
>  
> Thanks
> 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Query across two databases on the same server

2004-03-24 Thread Ed Reed
Is there any way to have a single select statement that can do a join
across two databases on the same server?
 
Thanks