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.

adding a function(computation) to a join?

3 posts in PB Infomaker Report Writer Last posting was on 1999-04-08 16:00:24.0Z
Miiko Posted on 1999-04-07 19:36:38.0Z
Newsgroups: sybase.public.infomaker.general
From: "Miiko" <mtgrl1@hotmail.com>
Organization: 198.59.57.101
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: adding a function(computation) to a join?
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Wed, 07 Apr 1999 15:36:38 -0400
Lines: 13
Message-ID: <348_2K#B03Sg#GA.226@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.infomaker.general:6432
Article PK: 241418

Hello,

I can gert the appropriate data if I join

TableA.Field1=TableB.FieldB

But I want to only look at the first two chacters on TableB.FieldB

For Example I want to pull data in TableB if the value of Field1 =12 and the
value of FieldB = 12AD34

I know the Mid or left functions will force InfoMaker to only look at the
certain characters in a field, but it is not avialble as function from the
Union screen.

Any Suggestions?
your responses are greatly appreciated!


Terry Dykstra Posted on 1999-04-07 23:27:43.0Z
Newsgroups: sybase.public.infomaker.general
From: "Terry Dykstra" <tdykstra@cfol.ab.ca>
Subject: Re: adding a function(computation) to a join?
Date: Wed, 7 Apr 1999 17:27:43 -0600
Lines: 31
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <348_XEt#O3Ug#GA.296@forums.sybase.com>
References: <348_2K#B03Sg#GA.226@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.infomaker.general:6431
Article PK: 241417

Instead of using the join button, create the join in the Where clause. Then
you can use your database functions. Be aware that mid() is an Infomaker
function and not a database function. You will have to use what your dbms
provides, .e.g. with Oracle you can use the substr() function.
You can off course convert to syntax as well, to change your join.

--
Terry Dykstra (TeamPS)
Canadian Forest Oil Ltd.

Miiko wrote in message <2K#B03Sg#GA.226@forums.sybase.com>...
>
>Hello,
>
>I can gert the appropriate data if I join
>
>TableA.Field1=TableB.FieldB
>
>But I want to only look at the first two chacters on TableB.FieldB
>
>For Example I want to pull data in TableB if the value of Field1 =12 and
the
>value of FieldB = 12AD34
>
>I know the Mid or left functions will force InfoMaker to only look at the
>certain characters in a field, but it is not avialble as function from the
>Union screen.
>
>Any Suggestions?
>your responses are greatly appreciated!


Rick Marden Posted on 1999-04-08 16:00:24.0Z
Newsgroups: sybase.public.infomaker.general
Reply-To: "Rick Marden" <rmarden@primavera.com>
From: "Rick Marden" <rmarden@primavera.com>
Subject: Re: adding a function(computation) to a join?
Date: Thu, 8 Apr 1999 12:00:24 -0400
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Message-ID: <348_odLsJidg#GA.256@forums.sybase.com>
References: <348_2K#B03Sg#GA.226@forums.sybase.com> <348_XEt#O3Ug#GA.296@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.infomaker.general:6430
Article PK: 241414

Since I know that Miiko is using an SQLA database, here is the syntax to use
in the Where clause (the Where tab in graphical mode), which seems to be the
same you would use in Oracle:

TableA.Field1 = substr(TableB.FieldB,1,2)

Rick Marden
Primavera Systems, Inc.

Terry Dykstra <tdykstra@cfol.ab.ca> wrote in message
news:XEt#O3Ug#GA.296@forums.sybase.com...
> Instead of using the join button, create the join in the Where clause.
Then
> you can use your database functions. Be aware that mid() is an Infomaker
> function and not a database function. You will have to use what your dbms
> provides, .e.g. with Oracle you can use the substr() function.
> You can off course convert to syntax as well, to change your join.
>
> --
> Terry Dykstra (TeamPS)
> Canadian Forest Oil Ltd.
> Miiko wrote in message <2K#B03Sg#GA.226@forums.sybase.com>...
> >
> >Hello,
> >
> >I can gert the appropriate data if I join
> >
> >TableA.Field1=TableB.FieldB
> >
> >But I want to only look at the first two chacters on TableB.FieldB
> >
> >For Example I want to pull data in TableB if the value of Field1 =12 and
> the
> >value of FieldB = 12AD34
> >
> >I know the Mid or left functions will force InfoMaker to only look at the
> >certain characters in a field, but it is not avialble as function from
the
> >Union screen.
> >
> >Any Suggestions?
> >your responses are greatly appreciated!
>
>