Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

multiple data sources in one datawindow

7 posts in DataWindow Last posting was on 2008-06-20 16:08:26.0Z
MM Posted on 2008-06-17 20:09:30.0Z
Sender: 6757.48567b1b.1804289383@sybase.com
From: MM
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: multiple data sources in one datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <485819fa.25cd.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 17 Jun 2008 13:09:30 -0700
X-Trace: forums-1-dub 1213733370 10.22.241.41 (17 Jun 2008 13:09:30 -0700)
X-Original-Trace: 17 Jun 2008 13:09:30 -0700, 10.22.241.41
Lines: 19
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87202
Article PK: 416459

Hi,

I need to create a datawindow to retrieve data from two data
sources (db servers). The syntax would look like this:

SELECT t0.column_one,
t0.column_two,
(SELECT t1.column_one FROM DATA_SOURCE_TWO t1 WHERE
t0.column_three=t1.column_two)
FROM DATA_SOURCE_ONE t0

Since they're two different users on two different dbs, thus
requires two seperate transaction objects, I'm unable to
successfully retrieve data.

I looked through Help but couldn't find anything useful. Can
anyone share what you've done for cases like this?

Thank you in advance!


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-06-17 20:38:28.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: multiple data sources in one datawindow
References: <485819fa.25cd.1681692777@sybase.com>
In-Reply-To: <485819fa.25cd.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <485820c4$1@forums-1-dub>
Date: 17 Jun 2008 13:38:28 -0700
X-Trace: forums-1-dub 1213735108 10.22.241.152 (17 Jun 2008 13:38:28 -0700)
X-Original-Trace: 17 Jun 2008 13:38:28 -0700, vip152.sybase.com
Lines: 31
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87203
Article PK: 416460

If you can do it in an ISQL session, you should be able to do it in a
DataWindow. I'm guessing that you can't do this in ISQL.

My suggestion:
Use a datastore to get the data from DataSource2. Use RowsCopy() or
RowsMove() to move those to an identical datastore that points to
DataSource1. (Select against a temp table, maybe?) Update that so that
your data from DataSource2 is now in the database (temp table?) in
DataSource1. Now, your real query isn't crossing servers... easy-peasy.

MM wrote:
> Hi,
>
> I need to create a datawindow to retrieve data from two data
> sources (db servers). The syntax would look like this:
>
> SELECT t0.column_one,
> t0.column_two,
> (SELECT t1.column_one FROM DATA_SOURCE_TWO t1 WHERE
> t0.column_three=t1.column_two)
> FROM DATA_SOURCE_ONE t0
>
> Since they're two different users on two different dbs, thus
> requires two seperate transaction objects, I'm unable to
> successfully retrieve data.
>
> I looked through Help but couldn't find anything useful. Can
> anyone share what you've done for cases like this?
>
> Thank you in advance!


M. Searer Posted on 2008-06-17 22:00:18.0Z
From: "M. Searer" <nospam@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <485819fa.25cd.1681692777@sybase.com>
In-Reply-To: <485819fa.25cd.1681692777@sybase.com>
Subject: Re: multiple data sources in one datawindow
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <485833f2$1@forums-1-dub>
Date: 17 Jun 2008 15:00:18 -0700
X-Trace: forums-1-dub 1213740018 10.22.241.152 (17 Jun 2008 15:00:18 -0700)
X-Original-Trace: 17 Jun 2008 15:00:18 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87204
Article PK: 416461

Your database would need to support some sort of remote connections if you want to do it all within a dw select.

"MM" wrote in message news:485819fa.25cd.1681692777@sybase.com...
> Hi,
>
> I need to create a datawindow to retrieve data from two data
> sources (db servers). The syntax would look like this:
>
> SELECT t0.column_one,
> t0.column_two,
> (SELECT t1.column_one FROM DATA_SOURCE_TWO t1 WHERE
> t0.column_three=t1.column_two)
> FROM DATA_SOURCE_ONE t0
>
> Since they're two different users on two different dbs, thus
> requires two seperate transaction objects, I'm unable to
> successfully retrieve data.
>
> I looked through Help but couldn't find anything useful. Can
> anyone share what you've done for cases like this?
>
> Thank you in advance!


JK Posted on 2008-06-17 20:41:39.0Z
From: JK <keese.john@jobcorps.org>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: multiple data sources in one datawindow
Date: Tue, 17 Jun 2008 13:41:39 -0700 (PDT)
Organization: http://groups.google.com
Lines: 27
Message-ID: <9059d78e-4282-48db-b1a4-11109bc9199e@c65g2000hsa.googlegroups.com>
References: <485819fa.25cd.1681692777@sybase.com>
NNTP-Posting-Host: 63.88.161.101
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1213735299 4648 127.0.0.1 (17 Jun 2008 20:41:39 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 17 Jun 2008 20:41:39 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: c65g2000hsa.googlegroups.com; posting-host=63.88.161.101; posting-account=QKTdPQoAAABrFHuu-hEmA0fohO4w66Yq
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!c65g2000hsa.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87205
Article PK: 416462


On Jun 17, 2:09 pm, MM wrote:
> Hi,
>
> I need to create a datawindow to retrieve data from two data
> sources (db servers). The syntax would look like this:
>
> SELECT t0.column_one,
> t0.column_two,
> (SELECT t1.column_one FROM DATA_SOURCE_TWO t1 WHERE
> t0.column_three=t1.column_two)
> FROM DATA_SOURCE_ONE t0
>
> Since they're two different users on two different dbs, thus
> requires two seperate transaction objects, I'm unable to
> successfully retrieve data.
>
> I looked through Help but couldn't find anything useful. Can
> anyone share what you've done for cases like this?
>
> Thank you in advance!

I don't think multiple datasources will work for one datawindow. A
work-around might be to use 2 pipelines that pull the data from both
datasources with the appropriate parameters, store them on a local db
of some type and then pull the datawindow from there.

JK


Terry Dykstra Posted on 2008-06-17 22:55:19.0Z
Reply-To: "Terry Dykstra" <dontreply_tddykstra@forestoil.ca.x>
From: "Terry Dykstra" <tddykstra@forestoil.ca>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <485819fa.25cd.1681692777@sybase.com>
Subject: Re: multiple data sources in one datawindow
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <485840d7$1@forums-1-dub>
Date: 17 Jun 2008 15:55:19 -0700
X-Trace: forums-1-dub 1213743319 10.22.241.152 (17 Jun 2008 15:55:19 -0700)
X-Original-Trace: 17 Jun 2008 15:55:19 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87207
Article PK: 416464

You need to use the facilities your DBMS provides. In Oracle, Informix you
create database links.
In SQLServer you can specify in your select statement something like:
<database1>..<table>.<column>
<database2>..<table>.<column>


--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

<MM> wrote in message news:485819fa.25cd.1681692777@sybase.com...
> Hi,
>
> I need to create a datawindow to retrieve data from two data
> sources (db servers). The syntax would look like this:
>
> SELECT t0.column_one,
> t0.column_two,
> (SELECT t1.column_one FROM DATA_SOURCE_TWO t1 WHERE
> t0.column_three=t1.column_two)
> FROM DATA_SOURCE_ONE t0
>
> Since they're two different users on two different dbs, thus
> requires two seperate transaction objects, I'm unable to
> successfully retrieve data.
>
> I looked through Help but couldn't find anything useful. Can
> anyone share what you've done for cases like this?
>
> Thank you in advance!


MM Posted on 2008-06-19 19:25:08.0Z
Sender: 6757.48567b1b.1804289383@sybase.com
From: MM
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: multiple data sources in one datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <485ab294.7390.1681692777@sybase.com>
References: <485840d7$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 19 Jun 2008 12:25:08 -0700
X-Trace: forums-1-dub 1213903508 10.22.241.41 (19 Jun 2008 12:25:08 -0700)
X-Original-Trace: 19 Jun 2008 12:25:08 -0700, 10.22.241.41
Lines: 38
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87217
Article PK: 416483

Yes database link works. Thanks much!

> You need to use the facilities your DBMS provides. In
> Oracle, Informix you create database links.
> In SQLServer you can specify in your select statement
> something like: <database1>..<table>.<column>
> <database2>..<table>.<column>
>
>
> --
> Terry Dykstra (TeamSybase)
> http://powerbuilder.codeXchange.sybase.com/
> http://casexpress.sybase.com
> product enhancement requests:
> http://my.isug.com/cgi-bin/1/c/submit_enhancement
>
> <MM> wrote in message
> > news:485819fa.25cd.1681692777@sybase.com... Hi,
> >
> > I need to create a datawindow to retrieve data from two
> > data sources (db servers). The syntax would look like
> this: >
> > SELECT t0.column_one,
> > t0.column_two,
> > (SELECT t1.column_one FROM DATA_SOURCE_TWO t1 WHERE
> > t0.column_three=t1.column_two)
> > FROM DATA_SOURCE_ONE t0
> >
> > Since they're two different users on two different dbs,
> > thus requires two seperate transaction objects, I'm
> > unable to successfully retrieve data.
> >
> > I looked through Help but couldn't find anything useful.
> > Can anyone share what you've done for cases like this?
> >
> > Thank you in advance!
>
>