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.

PB 11.5 compresses spaces in SQLSyntax?

5 posts in DataWindow Last posting was on 2009-11-11 14:49:34.0Z
Z K Posted on 2009-11-09 20:26:20.0Z
From: Z K <notroybuchanan@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: PB 11.5 compresses spaces in SQLSyntax?
Date: Mon, 9 Nov 2009 12:26:20 -0800 (PST)
Organization: http://groups.google.com
Lines: 16
Message-ID: <0307bcb5-2ec2-47df-a9c4-4dc1c0514cb0@g23g2000yqh.googlegroups.com>
NNTP-Posting-Host: 143.112.32.4
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1257798380 26893 127.0.0.1 (9 Nov 2009 20:26:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 9 Nov 2009 20:26:20 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g23g2000yqh.googlegroups.com; posting-host=143.112.32.4; posting-account=hMh6LAoAAAA4-LUehta5s0Hwh7OQ8lAj
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.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!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!g23g2000yqh.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90234
Article PK: 409838

I'm converting an application from PB 10.5 to 11.5. I have a
datawindow that has double spaces in the SQL syntax:

SELECT column1, column2, column3
FROM table1
WHERE <space> <space> column1 = value

This particular window has code in the SQLPreview event which searches
for "WHERE <space> <space> column1" but it turns out that the
SQLSyntax has compressed those two spaces down to one!

Is this an unusual circumstance or expected behavior? I can't find
any documentation nor any reference to this behavior in Sybase's
solved cases/technotes nor in these usenet groups.

Thanks.


Jeremy Lakeman Posted on 2009-11-09 23:16:35.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: PB 11.5 compresses spaces in SQLSyntax?
Date: Mon, 9 Nov 2009 15:16:35 -0800 (PST)
Organization: http://groups.google.com
Lines: 20
Message-ID: <5b05348f-63d8-4748-9a4e-2fc768a30536@j9g2000vbp.googlegroups.com>
References: <0307bcb5-2ec2-47df-a9c4-4dc1c0514cb0@g23g2000yqh.googlegroups.com>
NNTP-Posting-Host: 203.122.242.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1257808595 11396 127.0.0.1 (9 Nov 2009 23:16:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 9 Nov 2009 23:16:35 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j9g2000vbp.googlegroups.com; posting-host=203.122.242.105; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-Via: 1.1 fly.essential.com.au:3128 (squid/2.5.STABLE8), 1.0 asp.essential.intranet:3128 (squid/2.5.STABLE8)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 (.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!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!j9g2000vbp.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90235
Article PK: 409840


On Nov 10, 6:26 am, Z K <notroybucha...@gmail.com> wrote:
> I'm converting an application from PB 10.5 to 11.5.  I have a
> datawindow that has double spaces in the SQL syntax:
>
> SELECT column1, column2, column3
> FROM table1
> WHERE <space> <space> column1 = value
>
> This particular window has code in the SQLPreview event which searches
> for "WHERE <space> <space> column1" but it turns out that the
> SQLSyntax has compressed those two spaces down to one!
>
> Is this an unusual circumstance or expected behavior?  I can't find
> any documentation nor any reference to this behavior in Sybase's
> solved cases/technotes nor in these usenet groups.
>
> Thanks.

I haven't looked at dw syntax that closely, but I know PB compresses
all white space in embedded sql, so I can't say I'm surprised.


Z K Posted on 2009-11-10 22:58:58.0Z
From: Z K <notroybuchanan@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: PB 11.5 compresses spaces in SQLSyntax?
Date: Tue, 10 Nov 2009 14:58:58 -0800 (PST)
Organization: http://groups.google.com
Lines: 36
Message-ID: <794d777d-838e-4acb-bdd8-3f72fa175601@j19g2000yqk.googlegroups.com>
References: <0307bcb5-2ec2-47df-a9c4-4dc1c0514cb0@g23g2000yqh.googlegroups.com> <5b05348f-63d8-4748-9a4e-2fc768a30536@j9g2000vbp.googlegroups.com>
NNTP-Posting-Host: 143.112.32.4
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1257893939 14496 127.0.0.1 (10 Nov 2009 22:58:59 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 10 Nov 2009 22:58:59 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j19g2000yqk.googlegroups.com; posting-host=143.112.32.4; posting-account=hMh6LAoAAAA4-LUehta5s0Hwh7OQ8lAj
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.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!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!j19g2000yqk.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90236
Article PK: 409841


On Nov 9, 6:16 pm, Jeremy Lakeman <jeremy.lake...@gmail.com> wrote:
> On Nov 10, 6:26 am, Z K <notroybucha...@gmail.com> wrote:
>
>
>
> > I'm converting an application from PB 10.5 to 11.5.  I have a
> > datawindow that has double spaces in the SQL syntax:
>
> > SELECT column1, column2, column3
> > FROM table1
> > WHERE <space> <space> column1 = value
>
> > This particular window has code in the SQLPreview event which searches
> > for "WHERE <space> <space> column1" but it turns out that the
> > SQLSyntax has compressed those two spaces down to one!
>
> > Is this an unusual circumstance or expected behavior?  I can't find
> > any documentation nor any reference to this behavior in Sybase's
> > solved cases/technotes nor in these usenet groups.
>
> > Thanks.
>
> I haven't looked at dw syntax that closely, but I know PB compresses
> all white space in embedded sql, so I can't say I'm surprised.

Thanks for your reply, Jeremy.

I'll inform management that we need to edit our code to account for
compressed space. I anticipate they're going to ask me the following
question, so I wonder if you can help me with it:

In the PB 10.5 version of our code searching for double-space in
sqlsyntax works. Is compressing white space in sql new to 11.5?

Thanks again,
- Matt K


Scott Morris Posted on 2009-11-11 13:15:44.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <0307bcb5-2ec2-47df-a9c4-4dc1c0514cb0@g23g2000yqh.googlegroups.com> <5b05348f-63d8-4748-9a4e-2fc768a30536@j9g2000vbp.googlegroups.com> <794d777d-838e-4acb-bdd8-3f72fa175601@j19g2000yqk.googlegroups.com>
Subject: Re: PB 11.5 compresses spaces in SQLSyntax?
Lines: 15
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: <4afab900@forums-1-dub>
Date: 11 Nov 2009 05:15:44 -0800
X-Trace: forums-1-dub 1257945344 10.22.241.152 (11 Nov 2009 05:15:44 -0800)
X-Original-Trace: 11 Nov 2009 05:15:44 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90245
Article PK: 409850


> In the PB 10.5 version of our code searching for double-space in
> sqlsyntax works. Is compressing white space in sql new to 11.5?

Would it not be better to address the real issue? The application relies on
specific and undocumented behavior - apparently to parse the clauses of a
query in a rather simplistic manner. There might be better alternatives -
post some details about what you are trying to accomplish. Making some
assumptions, I'm guessing that this was a quick-and-dirty way to find the
where clause for the main query while avoiding any subqueries (as long as
the datawindow designer was very careful).

FWIW, I do recall a request to de-spacify generated select statements and I
think it had something to do with very verbose queries.


Z K Posted on 2009-11-11 14:49:34.0Z
From: Z K <notroybuchanan@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: PB 11.5 compresses spaces in SQLSyntax?
Date: Wed, 11 Nov 2009 06:49:34 -0800 (PST)
Organization: http://groups.google.com
Lines: 34
Message-ID: <81e5581a-2ba7-4e18-bc6e-21da2878bb98@a31g2000yqn.googlegroups.com>
References: <0307bcb5-2ec2-47df-a9c4-4dc1c0514cb0@g23g2000yqh.googlegroups.com> <5b05348f-63d8-4748-9a4e-2fc768a30536@j9g2000vbp.googlegroups.com> <794d777d-838e-4acb-bdd8-3f72fa175601@j19g2000yqk.googlegroups.com> <4afab900@forums-1-dub>
NNTP-Posting-Host: 143.112.32.4
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1257950974 17761 127.0.0.1 (11 Nov 2009 14:49:34 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 11 Nov 2009 14:49:34 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a31g2000yqn.googlegroups.com; posting-host=143.112.32.4; posting-account=hMh6LAoAAAA4-LUehta5s0Hwh7OQ8lAj
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.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!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!a31g2000yqn.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90246
Article PK: 409851


On Nov 11, 8:15 am, "Scott Morris" <bo...@bogus.com> wrote:
> > In the PB 10.5 version of our code searching for double-space in
> > sqlsyntax works.  Is compressing white space in sql new to 11.5?
>
> Would it not be better to address the real issue?  The application relies on
> specific and undocumented behavior - apparently to parse the clauses of a
> query in a rather simplistic manner.  There might be better alternatives -
> post some details about what you are trying to accomplish.  Making some
> assumptions, I'm guessing that this was a quick-and-dirty way to find the
> where clause for the main query while avoiding any subqueries (as long as
> the datawindow designer was very careful).
>
> FWIW, I do recall a request to de-spacify generated select statements and I
> think it had something to do with very verbose queries.

I agree with you 100%. Searching SQLSyntax for an exact string (non-
standard at that, with its double spaces) is prone to error. At this
stage of the game we're just compiling under PB 11.5 and beginning to
test our code at that level. So this is the research stage to ferret
out problems like this one and make plans to scan the entire code
base. This code has been around for about 10 years, so many
programmers have come and gone along the way. I suspect we'll find
more issues like this.

This is a very large set of applications, so any problem like this one
has a chance to be widespread. Rather than fix this one instance,
we're going to need to know the issues that exist so we can search the
entire code set and fix them all.

Thanks to both of you, Scott and Jeremy for your help.