From: Date: February 13 2007 6:33pm Subject: Re: Query Two Databases List-Archive: http://lists.mysql.com/mysql/204975 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_73927_5703947.1171387998561" ------=_Part_73927_5703947.1171387998561 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Perhaps, you can use the CONCAT function, SELECT CONCAT(a.Fields, " - ", b.Fields) FROM database1 a, database2 b On 13/02/07, Neil Tompkins wrote: > > Following on from the email below, if I run the query > > SELECT * FROM database1.table, database2.table > > I get the data back, but all the data is in the same row. > > How can I separate the records ? > > Regards > Neil > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > At the moment we are using mysql 3.23.58. It would appear I can't use > UNION > in this version ? > > Do I have any other options, without upgrading the database server versio= n > ? > > Regards, > Neil > > > > > >From: Nils J=FCnemann > >To: mysql@stripped > >Subject: Re: Query Two Databases > >Date: Thu, 25 Jan 2007 12:01:48 +0100 > > > >-----BEGIN PGP SIGNED MESSAGE----- > >Hash: SHA1 > > > >Neil Tompkins schrieb: > > > Not sure if this is possible or not. But I've two identical tables i= n > > > two different databases. Is it possible to retrieve data from the > > > different tables in one query ? > > > >(SELECT * FROM db1.table) UNION (SELECT * FROM db2.table) > > > >If db2 on a other mysql server, it is possible to use the > >federated storage engine of MySQL. > > > >- -- > >Nils J=FCnemann > >Database and System Administration > > > >studiVZ | Saarbrueckerstr. 38 | 10405 Berlin | phone +49-(0)30-405042715 > >www.studiVZ.net | fax +49-(0)30-28093887 | cell +49-(0)175-9331740 > >www.estudiLN.es | www.studentIX.pl | www.studiQG.fr | www.studiLN.it > >-----BEGIN PGP SIGNATURE----- > >Version: GnuPG v1.4.6 (MingW32) > >Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > > >iD8DBQFFuI4cYT5ehyp2X5ERAh/AAKCEDPXhlegrCu08jG0K3Eh/ZxIfgwCeIbZz > >hJRxd5b07AxIlFP8/RBKQx0=3D > >=3DG/4h > >-----END PGP SIGNATURE----- > > > >-- > >MySQL General Mailing List > >For list archives: http://lists.mysql.com/mysql > >To unsubscribe: > >http://lists.mysql.com/mysql?unsub=3Dneildtompkins@stripped > > > > _________________________________________________________________ > MSN Hotmail is evolving =96 check out the new Windows Live Mail > http://ideas.live.com > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dwwwhsd@stripped > > --=20 Henrique Dallazuanna Curitiba-Paran=E1 Brasil ------=_Part_73927_5703947.1171387998561--