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.

appending to null in datawindow works different than database

9 posts in DataWindow Last posting was on 2009-01-13 20:41:11.0Z
Sean Posted on 2009-01-09 12:15:55.0Z
Sender: 399e.49673e47.1804289383@sybase.com
From: Sean
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: appending to null in datawindow works different than database
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49673ffb.39df.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 9 Jan 2009 04:15:55 -0800
X-Trace: forums-1-dub 1231503355 10.22.241.41 (9 Jan 2009 04:15:55 -0800)
X-Original-Trace: 9 Jan 2009 04:15:55 -0800, 10.22.241.41
Lines: 27
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88526
Article PK: 417779

Hi,
I've noticed a difference in the way SQL Server is treating
a string and a PB 6.5 datawindow treats it.

For example, if you do

select null + ';' in SQL Server you get NULL

but if you put

select null + ';' into a datawindow you get ;

I have a function which builds up a string as follows:
select @output = isnull(@output + ';
'+rtrim([description]),rtrim([description]))

When I call the function in SQL Server I get 1;2;3
but when I call it from a datawindow I get ;1;2;3

I thought PB would just get the result from the function but
it seems to be processing/interpreting it.

Does anyone have any ideas as to why this might be happening
or a way around it?

Regards
Sean


Chris Pollach Posted on 2009-01-09 13:12:21.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49673ffb.39df.1681692777@sybase.com>
Subject: Re: appending to null in datawindow works different than database
Lines: 196
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49674d35$1@forums-1-dub>
Date: 9 Jan 2009 05:12:21 -0800
X-Trace: forums-1-dub 1231506741 10.22.241.152 (9 Jan 2009 05:12:21 -0800)
X-Original-Trace: 9 Jan 2009 05:12:21 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88529
Article PK: 417783

Hi Sean;

The DW has "relaxed" rules for NULL usage. However, this works OK for me
in PB 11.5 and if the DWO's column is null my expression or computed column
does *not* show the ";" (see attached). I wonder if this old version of PB
has a bug in respect to that area of processing.

The only work around for you at this stage that I could suggest is to
adjust for this aspect in your PB function or DW expression.

HTH

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com

<Sean> wrote in message news:49673ffb.39df.1681692777@sybase.com...
> Hi,
> I've noticed a difference in the way SQL Server is treating
> a string and a PB 6.5 datawindow treats it.
>
> For example, if you do
>
> select null + ';' in SQL Server you get NULL
>
> but if you put
>
> select null + ';' into a datawindow you get ;
>
> I have a function which builds up a string as follows:
> select @output = isnull(@output + ';
> '+rtrim([description]),rtrim([description]))
>
> When I call the function in SQL Server I get 1;2;3
> but when I call it from a datawindow I get ;1;2;3
>
> I thought PB would just get the result from the function but
> it seems to be processing/interpreting it.
>
> Does anyone have any ideas as to why this might be happening
> or a way around it?
>
> Regards
> Sean

DW_Null_Test.JPG

Sean Posted on 2009-01-09 13:43:51.0Z
Sender: 399e.49673e47.1804289383@sybase.com
From: Sean
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: appending to null in datawindow works different than database
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49675497.3e85.1681692777@sybase.com>
References: <49674d35$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 9 Jan 2009 05:43:51 -0800
X-Trace: forums-1-dub 1231508631 10.22.241.41 (9 Jan 2009 05:43:51 -0800)
X-Original-Trace: 9 Jan 2009 05:43:51 -0800, 10.22.241.41
Lines: 61
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88535
Article PK: 417792

Thanks Chris,
I'll amend the SQL server function.
I still don't understand why PB doesn't just pull the result
of the function back from the database but instead seems to
be processing it using its own rules.
Thanks again,
Regards,
Sean

> Hi Sean;
>
> The DW has "relaxed" rules for NULL usage. However,
> this works OK for me in PB 11.5 and if the DWO's column
> is null my expression or computed column does *not* show
> the ";" (see attached). I wonder if this old version of PB
> has a bug in respect to that area of processing.
>
> The only work around for you at this stage that I
> could suggest is to adjust for this aspect in your PB
> function or DW expression.
>
> HTH
>
> --
> Regards ... Chris
> ISUG - NA RUG Director
> http://chrispollach.pbdjmagazine.com
>
>
> <Sean> wrote in message
> > news:49673ffb.39df.1681692777@sybase.com... Hi,
> > I've noticed a difference in the way SQL Server is
> > treating a string and a PB 6.5 datawindow treats it.
> >
> > For example, if you do
> >
> > select null + ';' in SQL Server you get NULL
> >
> > but if you put
> >
> > select null + ';' into a datawindow you get ;
> >
> > I have a function which builds up a string as follows:
> > select @output = isnull(@output + ';
> > '+rtrim([description]),rtrim([description]))
> >
> > When I call the function in SQL Server I get 1;2;3
> > but when I call it from a datawindow I get ;1;2;3
> >
> > I thought PB would just get the result from the function
> > but it seems to be processing/interpreting it.
> >
> > Does anyone have any ideas as to why this might be
> > happening or a way around it?
> >
> > Regards
> > Sean
>
>
>
> [Attachment: DW_Null_Test.JPG]


Chris Pollach Posted on 2009-01-09 14:49:17.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49674d35$1@forums-1-dub> <49675497.3e85.1681692777@sybase.com>
Subject: Re: appending to null in datawindow works different than database
Lines: 69
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496763ed$1@forums-1-dub>
Date: 9 Jan 2009 06:49:17 -0800
X-Trace: forums-1-dub 1231512557 10.22.241.152 (9 Jan 2009 06:49:17 -0800)
X-Original-Trace: 9 Jan 2009 06:49:17 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88538
Article PK: 417790

Good luck! :-)

<Sean> wrote in message news:49675497.3e85.1681692777@sybase.com...
> Thanks Chris,
> I'll amend the SQL server function.
> I still don't understand why PB doesn't just pull the result
> of the function back from the database but instead seems to
> be processing it using its own rules.
> Thanks again,
> Regards,
> Sean
>
>> Hi Sean;
>>
>> The DW has "relaxed" rules for NULL usage. However,
>> this works OK for me in PB 11.5 and if the DWO's column
>> is null my expression or computed column does *not* show
>> the ";" (see attached). I wonder if this old version of PB
>> has a bug in respect to that area of processing.
>>
>> The only work around for you at this stage that I
>> could suggest is to adjust for this aspect in your PB
>> function or DW expression.
>>
>> HTH
>>
>> --
>> Regards ... Chris
>> ISUG - NA RUG Director
>> http://chrispollach.pbdjmagazine.com
>>
>>
>> <Sean> wrote in message
>> > news:49673ffb.39df.1681692777@sybase.com... Hi,
>> > I've noticed a difference in the way SQL Server is
>> > treating a string and a PB 6.5 datawindow treats it.
>> >
>> > For example, if you do
>> >
>> > select null + ';' in SQL Server you get NULL
>> >
>> > but if you put
>> >
>> > select null + ';' into a datawindow you get ;
>> >
>> > I have a function which builds up a string as follows:
>> > select @output = isnull(@output + ';
>> > '+rtrim([description]),rtrim([description]))
>> >
>> > When I call the function in SQL Server I get 1;2;3
>> > but when I call it from a datawindow I get ;1;2;3
>> >
>> > I thought PB would just get the result from the function
>> > but it seems to be processing/interpreting it.
>> >
>> > Does anyone have any ideas as to why this might be
>> > happening or a way around it?
>> >
>> > Regards
>> > Sean
>>
>>
>>
>> [Attachment: DW_Null_Test.JPG]


"Chris Keating [Sybase iAnywhere]" <keating_no Posted on 2009-01-09 14:59:20.0Z
From: "Chris Keating [Sybase iAnywhere]" <keating_no@spam_sybase.com>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: appending to null in datawindow works different than database
References: <49674d35$1@forums-1-dub> <49675497.3e85.1681692777@sybase.com>
In-Reply-To: <49675497.3e85.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: <49676648$1@forums-1-dub>
Date: 9 Jan 2009 06:59:20 -0800
X-Trace: forums-1-dub 1231513160 10.22.241.152 (9 Jan 2009 06:59:20 -0800)
X-Original-Trace: 9 Jan 2009 06:59:20 -0800, vip152.sybase.com
Lines: 81
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88542
Article PK: 417794

You may want to verify that MSS is being sent the query as your describe
from PB (i.e., compare statement in the SQLPreview event/PB database
TRACE to the statement that reaches the MSS side -- MSS should have a
diagnostic tool to record queries it receives).

You should also note that the handling of string concatenation with NULL
values is configurable in MSS. So, it may simply be that the PB
connection is configured differently from the MSS connection.

From the MSS documentation:

"When you concatenate null values, either the concat null yields null
setting of sp_dboption or SET CONCAT_NULL_YIELDS_NULL determines the
behavior when one expression is NULL. With either concat null yields
null or SET CONCAT_NULL_YIELDS_NULL enabled ON, 'string' + NULL returns
NULL. If either concat null yields null or SET CONCAT_NULL_YIELDS_NULL
is disabled, the result is 'string'."

Sean wrote:
> Thanks Chris,
> I'll amend the SQL server function.
> I still don't understand why PB doesn't just pull the result
> of the function back from the database but instead seems to
> be processing it using its own rules.
> Thanks again,
> Regards,
> Sean
>
>> Hi Sean;
>>
>> The DW has "relaxed" rules for NULL usage. However,
>> this works OK for me in PB 11.5 and if the DWO's column
>> is null my expression or computed column does *not* show
>> the ";" (see attached). I wonder if this old version of PB
>> has a bug in respect to that area of processing.
>>
>> The only work around for you at this stage that I
>> could suggest is to adjust for this aspect in your PB
>> function or DW expression.
>>
>> HTH
>>
>> --
>> Regards ... Chris
>> ISUG - NA RUG Director
>> http://chrispollach.pbdjmagazine.com
>>
>>
>> <Sean> wrote in message
>>> news:49673ffb.39df.1681692777@sybase.com... Hi,
>>> I've noticed a difference in the way SQL Server is
>>> treating a string and a PB 6.5 datawindow treats it.
>>>
>>> For example, if you do
>>>
>>> select null + ';' in SQL Server you get NULL
>>>
>>> but if you put
>>>
>>> select null + ';' into a datawindow you get ;
>>>
>>> I have a function which builds up a string as follows:
>>> select @output = isnull(@output + ';
>>> '+rtrim([description]),rtrim([description]))
>>>
>>> When I call the function in SQL Server I get 1;2;3
>>> but when I call it from a datawindow I get ;1;2;3
>>>
>>> I thought PB would just get the result from the function
>>> but it seems to be processing/interpreting it.
>>>
>>> Does anyone have any ideas as to why this might be
>>> happening or a way around it?
>>>
>>> Regards
>>> Sean
>>
>>
>> [Attachment: DW_Null_Test.JPG]


Sean Posted on 2009-01-09 15:24:42.0Z
Sender: 399e.49673e47.1804289383@sybase.com
From: Sean
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: appending to null in datawindow works different than database
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49676c3a.43df.1681692777@sybase.com>
References: <49676648$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 9 Jan 2009 07:24:42 -0800
X-Trace: forums-1-dub 1231514682 10.22.241.41 (9 Jan 2009 07:24:42 -0800)
X-Original-Trace: 9 Jan 2009 07:24:42 -0800, 10.22.241.41
Lines: 88
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88545
Article PK: 417797

Thanks Chris,
that was it.

> You may want to verify that MSS is being sent the query as
> your describe from PB (i.e., compare statement in the
> SQLPreview event/PB database TRACE to the statement that
> reaches the MSS side -- MSS should have a diagnostic tool
> to record queries it receives).
>
> You should also note that the handling of string
> concatenation with NULL values is configurable in MSS. So
> , it may simply be that the PB connection is configured
> differently from the MSS connection.
>
> From the MSS documentation:
>
> "When you concatenate null values, either the concat null
> yields null setting of sp_dboption or SET
> CONCAT_NULL_YIELDS_NULL determines the behavior when one
> expression is NULL. With either concat null yields null
> or SET CONCAT_NULL_YIELDS_NULL enabled ON, 'string' + NULL
> returns NULL. If either concat null yields null or SET
> CONCAT_NULL_YIELDS_NULL is disabled, the result is
> 'string'."
>
>
>
> Sean wrote:
> > Thanks Chris,
> > I'll amend the SQL server function.
> > I still don't understand why PB doesn't just pull the
> > result of the function back from the database but
> > instead seems to be processing it using its own rules.
> > Thanks again,
> > Regards,
> > Sean
> >
> >> Hi Sean;
> >>
> >> The DW has "relaxed" rules for NULL usage. However,
> >> this works OK for me in PB 11.5 and if the DWO's
> column >> is null my expression or computed column does
> *not* show >> the ";" (see attached). I wonder if this old
> version of PB >> has a bug in respect to that area of
> processing. >>
> >> The only work around for you at this stage that I
> >> could suggest is to adjust for this aspect in your PB
> >> function or DW expression.
> >>
> >> HTH
> >>
> >> --
> >> Regards ... Chris
> >> ISUG - NA RUG Director
> >> http://chrispollach.pbdjmagazine.com
> >>
> >>
> >> <Sean> wrote in message
> >>> news:49673ffb.39df.1681692777@sybase.com... Hi,
> >>> I've noticed a difference in the way SQL Server is
> >>> treating a string and a PB 6.5 datawindow treats it.
> >>>
> >>> For example, if you do
> >>>
> >>> select null + ';' in SQL Server you get NULL
> >>>
> >>> but if you put
> >>>
> >>> select null + ';' into a datawindow you get ;
> >>>
> >>> I have a function which builds up a string as follows:
> >>> select @output = isnull(@output + ';
> >>> '+rtrim([description]),rtrim([description]))
> >>>
> >>> When I call the function in SQL Server I get 1;2;3
> >>> but when I call it from a datawindow I get ;1;2;3
> >>>
> >>> I thought PB would just get the result from the
> function >>> but it seems to be processing/interpreting
> it. >>>
> >>> Does anyone have any ideas as to why this might be
> >>> happening or a way around it?
> >>>
> >>> Regards
> >>> Sean
> >>
> >>
> >> [Attachment: DW_Null_Test.JPG]


scionyx Posted on 2009-01-13 20:41:11.0Z
From: scionyx <sfield@scionyx.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: appending to null in datawindow works different than database
Date: Tue, 13 Jan 2009 12:41:11 -0800 (PST)
Organization: http://groups.google.com
Lines: 97
Message-ID: <c26b72a3-9eb3-472e-b5ce-79f25a876c9f@w24g2000prd.googlegroups.com>
References: <49676648$1@forums-1-dub> <49676c3a.43df.1681692777@sybase.com>
NNTP-Posting-Host: 170.104.61.146
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1231879272 19044 127.0.0.1 (13 Jan 2009 20:41:12 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 13 Jan 2009 20:41:12 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: w24g2000prd.googlegroups.com; posting-host=170.104.61.146; posting-account=-kzySgkAAAAqb7jiNSJ1XKXlAz27meBa
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),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!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!postnews.google.com!w24g2000prd.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88592
Article PK: 417845

FYI: I came across this in coverting from PB-5 (ODBC) to PB-10
(OLEDB). ODBC uses DBLIB and CONCAT_NULL_YIELDS_NULL is diasabled by
default. With OLEDB it's enabled by default so I had to add code to
disable it just after the app connects to maintain original behaviour.

Steve

On Jan 9, 7:24 am, Sean wrote:
> Thanks Chris,
> that was it.
>
>
>
> > You may want to verify that MSS is being sent the query as
> > your describe  from PB (i.e., compare statement in the
> > SQLPreview event/PB database  TRACE to the statement that
> > reaches the MSS side -- MSS should have a  diagnostic tool
> > to record queries it receives).
>
> > You should also note that the handling of string
> > concatenation with NULL  values is configurable in MSS. So
> > , it may simply be that the PB  connection is configured
> > differently from the MSS connection.
>
> >  From the MSS documentation:
>
> > "When you concatenate null values, either the concat null
> > yields null  setting of sp_dboption or SET
> > CONCAT_NULL_YIELDS_NULL determines the  behavior when one
> > expression is NULL. With either concat null yields  null
> > or SET CONCAT_NULL_YIELDS_NULL enabled ON, 'string' + NULL
> > returns  NULL. If either concat null yields null or SET
> > CONCAT_NULL_YIELDS_NULL  is disabled, the result is
> > 'string'."
>
> > Sean wrote:
> > > Thanks Chris,
> > > I'll amend the SQL server function.
> > > I still don't understand why PB doesn't just pull the
> > > result of the function back from the database but
> > > instead seems to be processing it using its own rules.
> > > Thanks again,
> > > Regards,
> > > Sean
>
> > >> Hi Sean;
>
> > >>     The DW has "relaxed" rules for NULL usage. However,
> > >> this works OK for me  in PB 11.5 and if the DWO's
> > column >> is null my expression or computed column  does
> > *not* show >> the ";" (see attached). I wonder if this old
> > version of PB >> has a bug in respect to that area of
> > processing. >>
> > >>     The only work around for you at this stage that I
> > >> could suggest is to  adjust for this aspect in your PB
> > >> function or DW expression.
>
> > >> HTH
>
> > >> --
> > >> Regards ... Chris
> > >> ISUG - NA RUG Director
> > >>http://chrispollach.pbdjmagazine.com
>
> > >> <Sean> wrote in message
> > >>>news:49673ffb.39df.1681692777@sybase.com... Hi,
> > >>> I've noticed a difference in the way SQL Server is
> > >>> treating a string and a PB 6.5 datawindow treats it.
>
> > >>> For example, if you do
>
> > >>> select null + ';' in SQL Server you get NULL
>
> > >>> but if you put
>
> > >>> select null + ';' into a datawindow you get ;
>
> > >>> I have a function which builds up a string as follows:
> > >>> select @output = isnull(@output + ';
> > >>> '+rtrim([description]),rtrim([description]))
>
> > >>> When I call the function in SQL Server I get 1;2;3
> > >>> but when I call it from a datawindow I get ;1;2;3
>
> > >>> I thought PB would just get the result from the
> > function >>> but it seems to be processing/interpreting
> > it. >>>
> > >>> Does anyone have any ideas as to why this might be
> > >>> happening or a way around it?
>
> > >>> Regards
> > >>> Sean
>
> > >> [Attachment: DW_Null_Test.JPG]- Hide quoted text -
>
> - Show quoted text -


Tyler Cruse Posted on 2009-01-12 22:57:31.0Z
Reply-To: "Tyler Cruse" <tcruse@trlx.com>
From: "Tyler Cruse" <tcruse@trlx.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49674d35$1@forums-1-dub> <49675497.3e85.1681692777@sybase.com> <49676648$1@forums-1-dub>
In-Reply-To: <49676648$1@forums-1-dub>
Subject: Re: appending to null in datawindow works different than database
Lines: 88
Organization: Trellix Engineering
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
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.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496bcadb$1@forums-1-dub>
Date: 12 Jan 2009 14:57:31 -0800
X-Trace: forums-1-dub 1231801051 10.22.241.152 (12 Jan 2009 14:57:31 -0800)
X-Original-Trace: 12 Jan 2009 14:57:31 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88570
Article PK: 417823

You might take a look at SQL Server 2008 books on line since there are some
changes in this area in the current release of SQL Server.

"Chris Keating [Sybase iAnywhere]" <keating_no@spam_sybase.com> wrote in
message news:49676648$1@forums-1-dub...
> You may want to verify that MSS is being sent the query as your describe
> from PB (i.e., compare statement in the SQLPreview event/PB database TRACE
> to the statement that reaches the MSS side -- MSS should have a diagnostic
> tool to record queries it receives).
>
> You should also note that the handling of string concatenation with NULL
> values is configurable in MSS. So, it may simply be that the PB connection
> is configured differently from the MSS connection.
>
> From the MSS documentation:
>
> "When you concatenate null values, either the concat null yields null
> setting of sp_dboption or SET CONCAT_NULL_YIELDS_NULL determines the
> behavior when one expression is NULL. With either concat null yields null
> or SET CONCAT_NULL_YIELDS_NULL enabled ON, 'string' + NULL returns NULL.
> If either concat null yields null or SET CONCAT_NULL_YIELDS_NULL is
> disabled, the result is 'string'."
>
>
>
> Sean wrote:
>> Thanks Chris,
>> I'll amend the SQL server function.
>> I still don't understand why PB doesn't just pull the result
>> of the function back from the database but instead seems to
>> be processing it using its own rules.
>> Thanks again,
>> Regards,
>> Sean
>>
>>> Hi Sean;
>>>
>>> The DW has "relaxed" rules for NULL usage. However,
>>> this works OK for me in PB 11.5 and if the DWO's column
>>> is null my expression or computed column does *not* show
>>> the ";" (see attached). I wonder if this old version of PB
>>> has a bug in respect to that area of processing.
>>>
>>> The only work around for you at this stage that I
>>> could suggest is to adjust for this aspect in your PB
>>> function or DW expression.
>>>
>>> HTH
>>>
>>> --
>>> Regards ... Chris
>>> ISUG - NA RUG Director
>>> http://chrispollach.pbdjmagazine.com
>>>
>>>
>>> <Sean> wrote in message
>>>> news:49673ffb.39df.1681692777@sybase.com... Hi,
>>>> I've noticed a difference in the way SQL Server is
>>>> treating a string and a PB 6.5 datawindow treats it.
>>>>
>>>> For example, if you do
>>>>
>>>> select null + ';' in SQL Server you get NULL
>>>>
>>>> but if you put
>>>>
>>>> select null + ';' into a datawindow you get ;
>>>>
>>>> I have a function which builds up a string as follows:
>>>> select @output = isnull(@output + ';
>>>> '+rtrim([description]),rtrim([description]))
>>>>
>>>> When I call the function in SQL Server I get 1;2;3
>>>> but when I call it from a datawindow I get ;1;2;3
>>>>
>>>> I thought PB would just get the result from the function
>>>> but it seems to be processing/interpreting it.
>>>>
>>>> Does anyone have any ideas as to why this might be
>>>> happening or a way around it?
>>>>
>>>> Regards
>>>> Sean
>>>
>>>
>>> [Attachment: DW_Null_Test.JPG]


Ken Balakrishnan Posted on 2009-01-09 15:03:41.0Z
From: "Ken Balakrishnan" <kNOeSPAMn@cpsREMOVEME92.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49673ffb.39df.1681692777@sybase.com>
Subject: Re: appending to null in datawindow works different than database
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4967674d$1@forums-1-dub>
Date: 9 Jan 2009 07:03:41 -0800
X-Trace: forums-1-dub 1231513421 10.22.241.152 (9 Jan 2009 07:03:41 -0800)
X-Original-Trace: 9 Jan 2009 07:03:41 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88543
Article PK: 417798

I'm not a SQL Server guy, but I'd guess that PB is sending an empty string
instead of a NULL in these cases.

Ken

<Sean> wrote in message news:49673ffb.39df.1681692777@sybase.com...
> Hi,
> I've noticed a difference in the way SQL Server is treating
> a string and a PB 6.5 datawindow treats it.
>
> For example, if you do
>
> select null + ';' in SQL Server you get NULL
>
> but if you put
>
> select null + ';' into a datawindow you get ;
>
> I have a function which builds up a string as follows:
> select @output = isnull(@output + ';
> '+rtrim([description]),rtrim([description]))
>
> When I call the function in SQL Server I get 1;2;3
> but when I call it from a datawindow I get ;1;2;3
>
> I thought PB would just get the result from the function but
> it seems to be processing/interpreting it.
>
> Does anyone have any ideas as to why this might be happening
> or a way around it?
>
> Regards
> Sean