I'm new at Sybase, I want to make a query selecting fields from
different databases, how can I make it?
Thanks for your time!
Sybase (the company) has 4 different database products (ASA, ASE, IQ,
Advantage),
so please specify the exact product, version and platform when you ask
a question.
Assuming you are asking about combining data from tables in
multiple databases on an Adaptive Server Enterprise server, you can
use fully qualified object names
(dbatabase_name.owner_name.table_name)
example:
select
a.col1, b.col2
from
table1..database1 a, table2..database2 b
where
a.pk = b.pk
(SNIP)
Assuming you are asking about combining data from tables in
multiple databases on an Adaptive Server Enterprise server, you can
use fully qualified object names
(dbatabase_name.owner_name.table_name)
example:
Bret obviously meant:
from
database1..table1 a, database2..table2 b (also ".." = ".dbo.")