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.

Retrieval argument of string type in datawindow SQL

5 posts in DataWindow Last posting was on 2009-12-16 15:53:09.0Z
Milan Stolarik Posted on 2009-12-16 15:10:48.0Z
Sender: 31eb.4b28f6cb.1804289383@sybase.com
From: Milan Stolarik
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Retrieval argument of string type in datawindow SQL
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b28f878.320d.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 16 Dec 2009 07:10:48 -0800
X-Trace: forums-1-dub 1260976248 10.22.241.41 (16 Dec 2009 07:10:48 -0800)
X-Original-Trace: 16 Dec 2009 07:10:48 -0800, 10.22.241.41
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90441
Article PK: 410042

Hi all,
when retrieval argument is added to datawindow SQL (computed
column) and its type is string, its definition is char(1)
for some reason.
If I correct it in edit source everything works fine, but if
sql is touched again char(1) is restored.

Same behaviour is in PB 11.2 8407 and 9.0.1 7096.

Thanks for help.


Jeremy Lakeman Posted on 2009-12-16 15:24:16.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Retrieval argument of string type in datawindow SQL
Date: Wed, 16 Dec 2009 07:24:16 -0800 (PST)
Organization: http://groups.google.com
Lines: 24
Message-ID: <0adcbc62-b287-4e95-aa31-fdc371ec3aa8@y10g2000prg.googlegroups.com>
References: <4b28f878.320d.1681692777@sybase.com>
NNTP-Posting-Host: 122.49.175.125
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1260977056 24918 127.0.0.1 (16 Dec 2009 15:24:16 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 16 Dec 2009 15:24:16 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: y10g2000prg.googlegroups.com; posting-host=122.49.175.125; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729),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!newsfeed.news2me.com!nx01.iad01.newshosting.com!newshosting.com!216.196.98.150.MISMATCH!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!y10g2000prg.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90442
Article PK: 410047


On Dec 17, 1:10 am, Milan Stolarik wrote:
> Hi all,
> when retrieval argument is added to datawindow SQL (computed
> column) and its type is string, its definition is char(1)
> for some reason.
> If I correct it in edit source everything works fine, but if
> sql is touched again char(1) is restored.
>
> Same behaviour is in PB 11.2 8407 and 9.0.1 7096.
>
> Thanks for help.

so you have something like;

select :retrieval_arg as name,
...

try;

select convert(varchar(255),:retrieval_arg) as name,
...

But then I'd question why you'd need the column in the result set when
the retrieval argument value is available to any computed expression.


Scott Morris Posted on 2009-12-16 15:53:09.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4b28f878.320d.1681692777@sybase.com> <0adcbc62-b287-4e95-aa31-fdc371ec3aa8@y10g2000prg.googlegroups.com>
Subject: Re: Retrieval argument of string type in datawindow SQL
Lines: 6
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b290265$1@forums-1-dub>
Date: 16 Dec 2009 07:53:09 -0800
X-Trace: forums-1-dub 1260978789 10.22.241.152 (16 Dec 2009 07:53:09 -0800)
X-Original-Trace: 16 Dec 2009 07:53:09 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90445
Article PK: 410048


> But then I'd question why you'd need the column in the result set when
> the retrieval argument value is available to any computed expression.

To have it included in all(?) export formats.


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-12-16 15:48:43.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4b28f878.320d.1681692777@sybase.com> <0adcbc62-b287-4e95-aa31-fdc371ec3aa8@y10g2000prg.googlegroups.com>
Subject: Re: Retrieval argument of string type in datawindow SQL
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b29015b@forums-1-dub>
Date: 16 Dec 2009 07:48:43 -0800
X-Trace: forums-1-dub 1260978523 10.22.241.152 (16 Dec 2009 07:48:43 -0800)
X-Original-Trace: 16 Dec 2009 07:48:43 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90444
Article PK: 410049

My guess would be the ability to set the initial value of a computed column
at run time rather than have it always start at the hard coded value in the
SQL.

--
Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement


"Jeremy Lakeman" <jeremy.lakeman@gmail.com> wrote in message
news:0adcbc62-b287-4e95-aa31-fdc371ec3aa8@y10g2000prg.googlegroups.com...

On Dec 17, 1:10 am, Milan Stolarik wrote:
> Hi all,
> when retrieval argument is added to datawindow SQL (computed
> column) and its type is string, its definition is char(1)
> for some reason.
> If I correct it in edit source everything works fine, but if
> sql is touched again char(1) is restored.
>
> Same behaviour is in PB 11.2 8407 and 9.0.1 7096.
>
> Thanks for help.

so you have something like;

select :retrieval_arg as name,
...

try;

select convert(varchar(255),:retrieval_arg) as name,
...

But then I'd question why you'd need the column in the result set when
the retrieval argument value is available to any computed expression.


Scott Morris Posted on 2009-12-16 15:29:09.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4b28f878.320d.1681692777@sybase.com>
Subject: Re: Retrieval argument of string type in datawindow SQL
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b28fcc5$1@forums-1-dub>
Date: 16 Dec 2009 07:29:09 -0800
X-Trace: forums-1-dub 1260977349 10.22.241.152 (16 Dec 2009 07:29:09 -0800)
X-Original-Trace: 16 Dec 2009 07:29:09 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90443
Article PK: 410050


<Milan Stolarik> wrote in message
news:4b28f878.320d.1681692777@sybase.com...
> Hi all,
> when retrieval argument is added to datawindow SQL (computed
> column) and its type is string, its definition is char(1)
> for some reason.
> If I correct it in edit source everything works fine, but if
> sql is touched again char(1) is restored.
>
> Same behaviour is in PB 11.2 8407 and 9.0.1 7096.

Cast / convert it to the appropriate datatype. You may want to consider
that your retrieval arguments are also available within the datawindow
itself without having to included them in the datasource query.