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.

Passing the table name as a parameter to a function

2 posts in Objects Last posting was on 2005-10-20 17:05:36.0Z
Jodi Posted on 2005-10-20 16:47:23.0Z
From: "Jodi" <jyomoo@yahoo.com>
Newsgroups: sybase.public.powerbuilder.objects
Organization: 136.181.195.9
X-Newsreader: AspNNTP 1.50 (Takeshi Eto)
Subject: Passing the table name as a parameter to a function
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: web110.discountasp.net
X-Original-NNTP-Posting-Host: web110.discountasp.net
Message-ID: <4357ca1b@forums-1-dub>
Date: 20 Oct 2005 09:47:23 -0700
X-Trace: forums-1-dub 1129826843 64.79.161.40 (20 Oct 2005 09:47:23 -0700)
X-Original-Trace: 20 Oct 2005 09:47:23 -0700, web110.discountasp.net
Lines: 11
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8676
Article PK: 735892

I have a function and depending on the datawindow I am passing to the function I
want to query a specific table, from within the function. I can pass the table
name as another parameter. But passing the table name as a string will not work
in this situation.

Please anybody suggest a way how a table can be used in the query, dynamically,
in the function.

Thanks!
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Michael Chernin Posted on 2005-10-20 17:05:36.0Z
From: "Michael Chernin" <please_remove_that_mchernin@verax.ca>
Newsgroups: sybase.public.powerbuilder.objects
References: <4357ca1b@forums-1-dub>
Subject: Re: Passing the table name as a parameter to a function
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: mail.dhltd.com
Message-ID: <4357cd73@forums-2-dub>
X-Original-Trace: 20 Oct 2005 10:01:39 -0700, mail.dhltd.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 20 Oct 2005 10:01:40 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 20 Oct 2005 10:05:36 -0700
X-Trace: forums-1-dub 1129827936 10.22.108.75 (20 Oct 2005 10:05:36 -0700)
X-Original-Trace: 20 Oct 2005 10:05:36 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!forums-2-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8677
Article PK: 735891

Look at Dynamic SQL section in PB help. There are different ways of doing
that depending on parameters and returning values of the dynamic SQL
statement.

"Jodi" <jyomoo@yahoo.com> wrote in message news:4357ca1b@forums-1-dub...
>I have a function and depending on the datawindow I am passing to the
>function I
> want to query a specific table, from within the function. I can pass the
> table
> name as another parameter. But passing the table name as a string will not
> work
> in this situation.
>
> Please anybody suggest a way how a table can be used in the query,
> dynamically,
> in the function.
>
> Thanks!
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp