Re: Two databases
Posted in 1996
Topics: SQL Development & Query Writing
Bryan Tonnet wrote:
>
> In <57ksld$kvk@cssun.mathcs.emory.edu> rrela@dc.uba.ar (Ramiro Rela) writes:
>
> >I need the sintaxis for a SELECT statement which uses tables in two
> >separate databases. Now I have
>
> > SELECT * FROM areas, viviendas
> > WHERE areas.numero = viviendas.numero>
> >but I'll move the table viviendas to another database.
>
> SELECT * FROM areas, otherdb:viviendas
> WHERE areas.numero = otherdb:viviendas.numero
If the database is in a difference dbserver, which could also be a different
server, then:
SELECT *
FROM areas, otherdb@dbserver:viviendas
WHERE areas.numero = otherdb@dbserver:viviendas.numero
> I guess this assumes you've got Informix Star, or Engine version 6.x or
> above.
Bryan's assumption still applies.
--
Mark.
+-------------------------------------------------------------------------+
|Mark D. Stock - The West Solutions Group http://www.west.co.za |
| The Informix FAQ is at http://www.iiug.org |
|mailto:marks@west.co.za +------------------------------------------------+
|Tel: +27 11 803 2151 |If it doesn't work... force it! |
|Fax: +27 11 803 2189 |If it breaks... it needed replacing anyway! |
|Cell: +27 83 250 2325 |Well, that's how I code anyway! |
+------------------------+------------------------------------------------+