Re: Two databases
Posted in 1996
In reply to Ramiro Rela's email about Two databases, on 28 Nov 96
Hi Ramiro,
> 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.
>
You can use
SELECT * FROM areas, someotherdb:viviendas v
WHERE areas.numero = v.numero
where someotherdb is the new database
or to be still specific you can use
SELECT * FROM areas, someotherdb@somedbserver:viviendas v
WHERE areas.numero = v.numero
where someotherdbservername is DBSERVERNAME of a different tbconfig /onconfig.
The second example is specific to OnLine.
I am not sure about the SE syntax but I think it uses the //somehostname
notation.
> TIA
> Ramiro.
HTH,
Ravi....
--
Ravi Joseph Pinto, mailto:ravi@in.dhl.com
Consultant, Astra Infotech, voice :91-22-8503000
Mumbai, India extn. 1531
Standard disclaimers apply.