dbTalk Databases Forums  

newbie question warning

comp.databases.sybase comp.databases.sybase


Discuss newbie question warning in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
yuriha
 
Posts: n/a

Default newbie question warning - 10-14-2009 , 11:48 AM






Hi!

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!

Reply With Quote
  #2  
Old   
Bret_Halford
 
Posts: n/a

Default Re: newbie question warning - 10-14-2009 , 02:11 PM






On Oct 14, 9:48*am, yuriha <yur... (AT) gmail (DOT) com> wrote:
Quote:
Hi!

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

Reply With Quote
  #3  
Old   
yuriha
 
Posts: n/a

Default Re: newbie question warning - 10-14-2009 , 02:30 PM



it worked, thank you very much !


On Oct 14, 1:11*pm, Bret_Halford <b... (AT) sybase (DOT) com> wrote:
Quote:
On Oct 14, 9:48*am, yuriha <yur... (AT) gmail (DOT) com> wrote:

Hi!

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

Reply With Quote
  #4  
Old   
Carl Kayser
 
Posts: n/a

Default Re: newbie question warning - 10-15-2009 , 08:49 AM



"Bret_Halford" <bret (AT) sybase (DOT) com> wrote

On Oct 14, 9:48 am, yuriha <yur... (AT) gmail (DOT) com> wrote:
Quote:
Hi!

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!
(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:

select
a.col1, b.col2
from
table1..database1 a, table2..database2 b
where
a.pk = b.pk


Bret obviously meant:

from
database1..table1 a, database2..table2 b (also ".." = ".dbo.")

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.