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.

Functions may only be nested to level 10 + str_replace

11 posts in General Discussion Last posting was on 2012-11-26 09:20:13.0Z
Karthikeyan.M Posted on 2012-11-20 06:41:12.0Z
Sender: 2a7e.50ab24ff.1804289383@sybase.com
From: Karthikeyan.M
Newsgroups: sybase.public.ase.general
Subject: Functions may only be nested to level 10 + str_replace
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50ab2608.2aa5.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 19 Nov 2012 22:41:12 -0800
X-Trace: forums-1-dub 1353393672 172.20.134.41 (19 Nov 2012 22:41:12 -0800)
X-Original-Trace: 19 Nov 2012 22:41:12 -0800, 172.20.134.41
Lines: 46
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31499
Article PK: 74389

All,

I have recently read about "Addition of digits" for a given
number. say for example, If the number is 5555 , The
expected output is 20. i.e. 5+5+5+5

I used the below query to get the desired result set.

declare @in_integer int
set @in_integer = 5555
select datalength( str_replace
(str_replace
(str_replace
(str_replace
(str_replace
( str_replace
(str_replace
(str_replace
(str_replace
(str_replace (CAST (@in_integer
AS VARCHAR(150)) ,'0', '') ,'1', '#'
) ,'2', '##'
) ,'3', '###'
) ,'4', '####'
) ,'5', '#####'
) ,'6', '######'
) ,'7', '#######'
) ,'8', '########'
) ,'9', '#########'
)
)

When I execute the query, I got the "Functions may only be
nested to level 10" error message.

I am using

Adaptive Server Enterprise/15.5/EBF 19397 SMP
ESD#5/P/ia64/HP-UX B.11.23/asear155/2568/64-bit/FBO/Fri Dec
9 02:34:21 2011

what is causing this issue?
How to increase the nesting nevel?
There could be some other way to achieve the same. But i am
not interested to know the alternate solution for this
problem. I just wanted to resolve this issue for now.


Rob V Posted on 2012-11-20 09:05:04.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Functions may only be nested to level 10 + str_replace
References: <50ab2608.2aa5.1681692777@sybase.com>
In-Reply-To: <50ab2608.2aa5.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: <50ab47c0$1@forums-1-dub>
Date: 20 Nov 2012 01:05:04 -0800
X-Trace: forums-1-dub 1353402304 172.20.134.152 (20 Nov 2012 01:05:04 -0800)
X-Original-Trace: 20 Nov 2012 01:05:04 -0800, vip152.sybase.com
Lines: 81
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31501
Article PK: 74390


On 20-Nov-2012 07:41, Karthikeyan.M wrote:
> All,
>
> I have recently read about "Addition of digits" for a given
> number. say for example, If the number is 5555 , The
> expected output is 20. i.e. 5+5+5+5
>
> I used the below query to get the desired result set.
>
> declare @in_integer int
> set @in_integer = 5555
> select datalength( str_replace
> (str_replace
> (str_replace
> (str_replace
> (str_replace
> ( str_replace
> (str_replace
> (str_replace
> (str_replace
> (str_replace (CAST (@in_integer
> AS VARCHAR(150)) ,'0', '') ,'1', '#'
> ) ,'2', '##'
> ) ,'3', '###'
> ) ,'4', '####'
> ) ,'5', '#####'
> ) ,'6', '######'
> ) ,'7', '#######'
> ) ,'8', '########'
> ) ,'9', '#########'
> )
> )
>
> When I execute the query, I got the "Functions may only be
> nested to level 10" error message.
>
> I am using
>
> Adaptive Server Enterprise/15.5/EBF 19397 SMP
> ESD#5/P/ia64/HP-UX B.11.23/asear155/2568/64-bit/FBO/Fri Dec
> 9 02:34:21 2011
>
> what is causing this issue?
> How to increase the nesting nevel?
> There could be some other way to achieve the same. But i am
> not interested to know the alternate solution for this
> problem. I just wanted to resolve this issue for now.
>

This is a hard limit built in to ASE. It would be very uncommon that
you'd need to nest built-in functions more than 10 levels deep; if you
need to do that, SQL may not be the right language to solve your problem.

As you say, it would be very simple to solve this problem with a
different algorithm that does not use recursion.

If you really want, you could write your own SQL function which does
something similar to str_replace() (see sp_str_replace2() at
http://www.sypron.nl/udf.html#sqlex as an example). For SQL functions,
you can configure the maximum nesting level as deep as 100 of you are
running ASE 15.0.3 or later, but you would probably also need to
increase the stack space.


HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


M.Karthikeyan Posted on 2012-11-21 06:40:33.0Z
Sender: 7be2.50ac7643.846930886@sybase.com
From: M.Karthikeyan
Newsgroups: sybase.public.ase.general
Subject: Re: Functions may only be nested to level 10 + str_replace
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50ac7761.7c0e.1681692777@sybase.com>
References: <50ab47c0$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 20 Nov 2012 22:40:33 -0800
X-Trace: forums-1-dub 1353480033 172.20.134.41 (20 Nov 2012 22:40:33 -0800)
X-Original-Trace: 20 Nov 2012 22:40:33 -0800, 172.20.134.41
Lines: 103
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31504
Article PK: 74393

Thanks Rob V.

For SQL functions,
you can configure the maximum nesting level as deep as 100
of you are running ASE 15.0.3 or later,

Can you tell me THE WAY IN DETAIL?

but you would probably also need to increase the stack
space.

Can you tell me the way in detail?

Pls dont point some URL...

> On 20-Nov-2012 07:41, Karthikeyan.M wrote:
> > All,
> >
> > I have recently read about "Addition of digits" for a
> > given number. say for example, If the number is 5555 ,
> > The expected output is 20. i.e. 5+5+5+5
> >
> > I used the below query to get the desired result set.
> >
> > declare @in_integer int
> > set @in_integer = 5555
> > select datalength( str_replace
> > (str_replace
> > (str_replace
> > (str_replace
> > (str_replace
> > ( str_replace
> > (str_replace
> > (str_replace
> > (str_replace
> > (str_replace (CAST
> > (@in_integer AS VARCHAR(150)) ,'0', '') ,'1', '#'
> > ) ,'2', '##'
> > ) ,'3', '###'
> > ) ,'4', '####'
> > ) ,'5', '#####'
> > ) ,'6', '######'
> > ) ,'7', '#######'
> > ) ,'8', '########'
> > ) ,'9', '#########'
> > )
> > )
> >
> > When I execute the query, I got the "Functions may only
> > be nested to level 10" error message.
> >
> > I am using
> >
> > Adaptive Server Enterprise/15.5/EBF 19397 SMP
> > ESD#5/P/ia64/HP-UX B.11.23/asear155/2568/64-bit/FBO/Fri
> > Dec 9 02:34:21 2011
> >
> > what is causing this issue?
> > How to increase the nesting nevel?
> > There could be some other way to achieve the same. But i
> > am not interested to know the alternate solution for
> > this problem. I just wanted to resolve this issue for
> now. >
>
> This is a hard limit built in to ASE. It would be very
> uncommon that you'd need to nest built-in functions more
> than 10 levels deep; if you need to do that, SQL may not
> be the right language to solve your problem.
>
> As you say, it would be very simple to solve this problem
> with a different algorithm that does not use recursion.
>
> If you really want, you could write your own SQL function
> which does something similar to str_replace() (see
> sp_str_replace2() at http://www.sypron.nl/udf.html#sqlex
> as an example). For SQL functions, you can configure the
> maximum nesting level as deep as 100 of you are running
> ASE 15.0.3 or later, but you would probably also need to
> increase the stack space.
>
>
> HTH,
>
> Rob V.
> ----------------------------------------------------------
> ------- Rob Verschoor
>
> Certified Professional DBA for Sybase ASE, IQ, Replication
> Server
>
> Author of Sybase books (order online at
> www.sypron.nl/shop): "Tips, Tricks & Recipes for Sybase
> ASE" "The Complete Sybase IQ Quick Reference Guide"
> "The Complete Sybase ASE Quick Reference Guide"
> "The Complete Sybase Replication Server Quick Reference
> Guide"
>
> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
> Commerce 27138666
> ----------------------------------------------------------
> -------


Rob V Posted on 2012-11-21 11:00:57.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Functions may only be nested to level 10 + str_replace
References: <50ab47c0$1@forums-1-dub> <50ac7761.7c0e.1681692777@sybase.com>
In-Reply-To: <50ac7761.7c0e.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: <50acb469$1@forums-1-dub>
Date: 21 Nov 2012 03:00:57 -0800
X-Trace: forums-1-dub 1353495657 172.20.134.152 (21 Nov 2012 03:00:57 -0800)
X-Original-Trace: 21 Nov 2012 03:00:57 -0800, vip152.sybase.com
Lines: 133
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31507
Article PK: 74395

sp_configure 'max nesting level', NNN (NNN=your desired level)
go

To increase the stack space, use sp_configure to bump up the 'stack
size' parameter. Nobody can tell how much you will actually need for
your particular query, so you'll have to try and see.

sp_configure 'stack size', NNN (NNN=your desired level)
go

Note that both 'max nesting level' and 'stack size' are static
parameters so you need to reboot ASE for changes to take effect.
When increasing the stack size, you may be forced to increase the 'max
memory' setting first, but ASE will tell you to do that.

It sounds like you may have to go through a bit of a learning curve
here; it is not realistic to completely cook up everything you need to
do, because there are too many unknowns here (and again, this is just
not the normal sort of thing to do in ASE).

URLs are great!

HTH,

Rob V.

On 21-Nov-2012 07:40, M.Karthikeyan wrote:
> Thanks Rob V.
>
> For SQL functions,
> you can configure the maximum nesting level as deep as 100
> of you are running ASE 15.0.3 or later,
>
> Can you tell me THE WAY IN DETAIL?
>
> but you would probably also need to increase the stack
> space.
>
> Can you tell me the way in detail?
>
> Pls dont point some URL...
>
>
>> On 20-Nov-2012 07:41, Karthikeyan.M wrote:
>>> All,
>>>
>>> I have recently read about "Addition of digits" for a
>>> given number. say for example, If the number is 5555 ,
>>> The expected output is 20. i.e. 5+5+5+5
>>>
>>> I used the below query to get the desired result set.
>>>
>>> declare @in_integer int
>>> set @in_integer = 5555
>>> select datalength( str_replace
>>> (str_replace
>>> (str_replace
>>> (str_replace
>>> (str_replace
>>> ( str_replace
>>> (str_replace
>>> (str_replace
>>> (str_replace
>>> (str_replace (CAST
>>> (@in_integer AS VARCHAR(150)) ,'0', '') ,'1', '#'
>>> ) ,'2', '##'
>>> ) ,'3', '###'
>>> ) ,'4', '####'
>>> ) ,'5', '#####'
>>> ) ,'6', '######'
>>> ) ,'7', '#######'
>>> ) ,'8', '########'
>>> ) ,'9', '#########'
>>> )
>>> )
>>>
>>> When I execute the query, I got the "Functions may only
>>> be nested to level 10" error message.
>>>
>>> I am using
>>>
>>> Adaptive Server Enterprise/15.5/EBF 19397 SMP
>>> ESD#5/P/ia64/HP-UX B.11.23/asear155/2568/64-bit/FBO/Fri
>>> Dec 9 02:34:21 2011
>>>
>>> what is causing this issue?
>>> How to increase the nesting nevel?
>>> There could be some other way to achieve the same. But i
>>> am not interested to know the alternate solution for
>>> this problem. I just wanted to resolve this issue for
>> now. >
>>
>> This is a hard limit built in to ASE. It would be very
>> uncommon that you'd need to nest built-in functions more
>> than 10 levels deep; if you need to do that, SQL may not
>> be the right language to solve your problem.
>>
>> As you say, it would be very simple to solve this problem
>> with a different algorithm that does not use recursion.
>>
>> If you really want, you could write your own SQL function
>> which does something similar to str_replace() (see
>> sp_str_replace2() at http://www.sypron.nl/udf.html#sqlex
>> as an example). For SQL functions, you can configure the
>> maximum nesting level as deep as 100 of you are running
>> ASE 15.0.3 or later, but you would probably also need to
>> increase the stack space.
>>
>>
>> HTH,
>>
>> Rob V.
>> ----------------------------------------------------------
>> ------- Rob Verschoor
>>
>> Certified Professional DBA for Sybase ASE, IQ, Replication
>> Server
>>
>> Author of Sybase books (order online at
>> www.sypron.nl/shop): "Tips, Tricks & Recipes for Sybase
>> ASE" "The Complete Sybase IQ Quick Reference Guide"
>> "The Complete Sybase ASE Quick Reference Guide"
>> "The Complete Sybase Replication Server Quick Reference
>> Guide"
>>
>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
>> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
>> Commerce 27138666
>> ----------------------------------------------------------
>> -------


hy Posted on 2012-11-21 08:35:19.0Z
From: "hy" <nospam_harrylhy@gmail.com>
Newsgroups: sybase.public.ase.general
References: <50ab47c0$1@forums-1-dub> <50ac7761.7c0e.1681692777@sybase.com>
In-Reply-To: <50ac7761.7c0e.1681692777@sybase.com>
Subject: Re: Functions may only be nested to level 10 + str_replace
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="big5"; reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50ac9247$1@forums-1-dub>
Date: 21 Nov 2012 00:35:19 -0800
X-Trace: forums-1-dub 1353486919 172.20.134.152 (21 Nov 2012 00:35:19 -0800)
X-Original-Trace: 21 Nov 2012 00:35:19 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31506
Article PK: 74396

Just tested the alternative way, you can use derived table to seperate some str_replace() to sub-query, then add the remain
str_replace() to main query, see the follow;

===========================================================================
declare @in_integer int
set @in_integer = 5555

select datalength(
str_replace (
str_replace ( c1,'8', '########')
,'9', '#########')
)
from (
select c1 = str_replace (
str_replace (
str_replace (
str_replace (
str_replace (
str_replace (
str_replace (
str_replace (
CAST (@in_integer AS VARCHAR(150))
,'0', '')
,'1', '#')
,'2', '##')
,'3', '###')
,'4', '####')
,'5', '#####')
,'6', '######')
,'7', '#######')
) a
===========================================================================

Hope this can help :)



"M.Karthikeyan" 礎b繞l瞼籀簣i繞K瞻繙簧e瞼D礎簧 50ac7761.7c0e.1681692777@sybase.com 瞻瞻翹繞翹g...

> Thanks Rob V.
>
> For SQL functions,
> you can configure the maximum nesting level as deep as 100
> of you are running ASE 15.0.3 or later,
>
> Can you tell me THE WAY IN DETAIL?
>
> but you would probably also need to increase the stack
> space.
>
> Can you tell me the way in detail?
>
> Pls dont point some URL...
>
>
>> On 20-Nov-2012 07:41, Karthikeyan.M wrote:
>> > All,
>> >
>> > I have recently read about "Addition of digits" for a
>> > given number. say for example, If the number is 5555 ,
>> > The expected output is 20. i.e. 5+5+5+5
>> >
>> > I used the below query to get the desired result set.
>> >
>> > declare @in_integer int
>> > set @in_integer = 5555
>> > select datalength( str_replace
>> > (str_replace
>> > (str_replace
>> > (str_replace
>> > (str_replace
>> > ( str_replace
>> > (str_replace
>> > (str_replace
>> > (str_replace
>> > (str_replace (CAST
>> > (@in_integer AS VARCHAR(150)) ,'0', '') ,'1', '#'
>> > ) ,'2', '##'
>> > ) ,'3', '###'
>> > ) ,'4', '####'
>> > ) ,'5', '#####'
>> > ) ,'6', '######'
>> > ) ,'7', '#######'
>> > ) ,'8', '########'
>> > ) ,'9', '#########'
>> > )
>> > )
>> >
>> > When I execute the query, I got the "Functions may only
>> > be nested to level 10" error message.
>> >
>> > I am using
>> >
>> > Adaptive Server Enterprise/15.5/EBF 19397 SMP
>> > ESD#5/P/ia64/HP-UX B.11.23/asear155/2568/64-bit/FBO/Fri
>> > Dec 9 02:34:21 2011
>> >
>> > what is causing this issue?
>> > How to increase the nesting nevel?
>> > There could be some other way to achieve the same. But i
>> > am not interested to know the alternate solution for
>> > this problem. I just wanted to resolve this issue for
>> now. >
>>
>> This is a hard limit built in to ASE. It would be very
>> uncommon that you'd need to nest built-in functions more
>> than 10 levels deep; if you need to do that, SQL may not
>> be the right language to solve your problem.
>>
>> As you say, it would be very simple to solve this problem
>> with a different algorithm that does not use recursion.
>>
>> If you really want, you could write your own SQL function
>> which does something similar to str_replace() (see
>> sp_str_replace2() at http://www.sypron.nl/udf.html#sqlex
>> as an example). For SQL functions, you can configure the
>> maximum nesting level as deep as 100 of you are running
>> ASE 15.0.3 or later, but you would probably also need to
>> increase the stack space.
>>
>>
>> HTH,
>>
>> Rob V.
>> ----------------------------------------------------------
>> ------- Rob Verschoor
>>
>> Certified Professional DBA for Sybase ASE, IQ, Replication
>> Server
>>
>> Author of Sybase books (order online at
>> www.sypron.nl/shop): "Tips, Tricks & Recipes for Sybase
>> ASE" "The Complete Sybase IQ Quick Reference Guide"
>> "The Complete Sybase ASE Quick Reference Guide"
>> "The Complete Sybase Replication Server Quick Reference
>> Guide"
>>
>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
>> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
>> Commerce 27138666
>> ----------------------------------------------------------
>> -------


answer Posted on 2012-11-21 18:59:54.0Z
Sender: 171a.50ad214f.1804289383@sybase.com
From: answer
Newsgroups: sybase.public.ase.general
Subject: Re: Functions may only be nested to level 10 + str_replace
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50ad24aa.179b.1681692777@sybase.com>
References: <50ac7761.7c0e.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 21 Nov 2012 10:59:54 -0800
X-Trace: forums-1-dub 1353524394 172.20.134.41 (21 Nov 2012 10:59:54 -0800)
X-Original-Trace: 21 Nov 2012 10:59:54 -0800, 172.20.134.41
Lines: 8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31513
Article PK: 74401


>
> Can you tell me the way in detail?
>
> Pls dont point some URL...
>

vookey sir, i will stand by and tell you everything step by
step. I will learn and google and read links, you just wait
for me vookey.


Karthikeyan.M Posted on 2012-11-22 05:07:41.0Z
Sender: 3130.50adafba.1804289383@sybase.com
From: Karthikeyan.M
Newsgroups: sybase.public.ase.general
Subject: Re: Functions may only be nested to level 10 + str_replace
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50adb31d.31e8.1681692777@sybase.com>
References: <50ad24aa.179b.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 21 Nov 2012 21:07:41 -0800
X-Trace: forums-1-dub 1353560861 172.20.134.41 (21 Nov 2012 21:07:41 -0800)
X-Original-Trace: 21 Nov 2012 21:07:41 -0800, 172.20.134.41
Lines: 26
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31514
Article PK: 74402


> >
> > Can you tell me the way in detail?
> >
> > Pls dont point some URL...
> >
> vookey sir, i will stand by and tell you everything step
> by step. I will learn and google and read links, you just
> wait for me vookey.

No Need to stand and tell... :-)

you can just sit and tell or use keyboard type and tell.

:-)

Actually there are lot of ways to tell other than "Stand by
and tell". :-) Please learn and google and read links for
this :)))

Hey..Just kidding :)

I have already visited the URL's and saw 6 is the default
one for the "maximum nesting level"...but for me..once it
reaches 10..it is throwing the error..Thats why i asked.

Note: 16 is set in my DB for now.


Karthikeyan M Posted on 2012-11-23 04:11:03.0Z
Sender: 4a8b.50ae142f.1804289383@sybase.com
From: Karthikeyan M
Newsgroups: sybase.public.ase.general
Subject: Re: Functions may only be nested to level 10 + str_replace
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50aef757.7863.1681692777@sybase.com>
References: <50adb31d.31e8.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 22 Nov 2012 20:11:03 -0800
X-Trace: forums-1-dub 1353643863 172.20.134.41 (22 Nov 2012 20:11:03 -0800)
X-Original-Trace: 22 Nov 2012 20:11:03 -0800, 172.20.134.41
Lines: 32
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31520
Article PK: 74411

I saw 16 is the default one for the "maximum nesting
level"...but for me..once it reaches 10..it is throwing the
error..In my DB, It is 16 only.

> > >
> > > Can you tell me the way in detail?
> > >
> > > Pls dont point some URL...
> > >
> > vookey sir, i will stand by and tell you everything step
> > by step. I will learn and google and read links, you
> > just wait for me vookey.
>
> No Need to stand and tell... :-)
>
> you can just sit and tell or use keyboard type and tell.
>
> :-)
>
> Actually there are lot of ways to tell other than "Stand
> by and tell". :-) Please learn and google and read links
> for this :)))
>
> Hey..Just kidding :)
>
> I have already visited the URL's and saw 6 is the default
> one for the "maximum nesting level"...but for me..once it
> reaches 10..it is throwing the error..Thats why i asked.
>
> Note: 16 is set in my DB for now.


Rob V Posted on 2012-11-23 07:42:26.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Functions may only be nested to level 10 + str_replace
References: <50adb31d.31e8.1681692777@sybase.com> <50aef757.7863.1681692777@sybase.com>
In-Reply-To: <50aef757.7863.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: <50af28e2$1@forums-1-dub>
Date: 22 Nov 2012 23:42:26 -0800
X-Trace: forums-1-dub 1353656546 172.20.134.152 (22 Nov 2012 23:42:26 -0800)
X-Original-Trace: 22 Nov 2012 23:42:26 -0800, vip152.sybase.com
Lines: 27
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31523
Article PK: 74410


On 23-Nov-2012 05:11, Karthikeyan M wrote:
> I saw 16 is the default one for the "maximum nesting
> level"...but for me..once it reaches 10..it is throwing the
> error..In my DB, It is 16 only.

As I replied earlier: the 'max nesting level' is for SQL Functions
(which you write yourself).
str_replace() is a built-in function which comes built into ASE; here
the hard maximum of 10 applies.

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


M.Karthikeyan Posted on 2012-11-26 05:45:03.0Z
Sender: 2742.50b300a1.1804289383@sybase.com
From: M.KARTHIKEYAN
Newsgroups: sybase.public.ase.general
Subject: Re: Functions may only be nested to level 10 + str_replace
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50b301df.2797.1681692777@sybase.com>
References: <50af28e2$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 25 Nov 2012 21:45:03 -0800
X-Trace: forums-1-dub 1353908703 172.20.134.41 (25 Nov 2012 21:45:03 -0800)
X-Original-Trace: 25 Nov 2012 21:45:03 -0800, 172.20.134.41
Lines: 37
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31529
Article PK: 74418

Rob V,

Got it. is 10 is common for all the build-in functions? or
only for str_replace() ?

> On 23-Nov-2012 05:11, Karthikeyan M wrote:
> > I saw 16 is the default one for the "maximum nesting
> > level"...but for me..once it reaches 10..it is throwing
> > the error..In my DB, It is 16 only.
>
> As I replied earlier: the 'max nesting level' is for SQL
> Functions (which you write yourself).
> str_replace() is a built-in function which comes built
> into ASE; here the hard maximum of 10 applies.
>
> HTH,
>
> Rob V.
> ----------------------------------------------------------
> ------- Rob Verschoor
>
> Certified Professional DBA for Sybase ASE, IQ, Replication
> Server
>
> Author of Sybase books (order online at
> www.sypron.nl/shop): "Tips, Tricks & Recipes for Sybase
> ASE" "The Complete Sybase IQ Quick Reference Guide"
> "The Complete Sybase ASE Quick Reference Guide"
> "The Complete Sybase Replication Server Quick Reference
> Guide"
>
> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
> Commerce 27138666
> ----------------------------------------------------------
> -------


Rob V Posted on 2012-11-26 09:20:13.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Functions may only be nested to level 10 + str_replace
References: <50af28e2$1@forums-1-dub> <50b301df.2797.1681692777@sybase.com>
In-Reply-To: <50b301df.2797.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: <50b3344d$1@forums-1-dub>
Date: 26 Nov 2012 01:20:13 -0800
X-Trace: forums-1-dub 1353921613 172.20.134.152 (26 Nov 2012 01:20:13 -0800)
X-Original-Trace: 26 Nov 2012 01:20:13 -0800, vip152.sybase.com
Lines: 67
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31530
Article PK: 74419

All built-in functions. If you try th following it should giv ethe same
error:

select
ltrim(ltrim(ltrim(ltrim(ltrim(ltrim(ltrim(ltrim(ltrim(ltrim(ltrim('x')))))))))))

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------

On 26-Nov-2012 06:45, M.KARTHIKEYAN wrote:
> Rob V,
>
> Got it. is 10 is common for all the build-in functions? or
> only for str_replace() ?
>
>
>> On 23-Nov-2012 05:11, Karthikeyan M wrote:
>>> I saw 16 is the default one for the "maximum nesting
>>> level"...but for me..once it reaches 10..it is throwing
>>> the error..In my DB, It is 16 only.
>>
>> As I replied earlier: the 'max nesting level' is for SQL
>> Functions (which you write yourself).
>> str_replace() is a built-in function which comes built
>> into ASE; here the hard maximum of 10 applies.
>>
>> HTH,
>>
>> Rob V.
>> ----------------------------------------------------------
>> ------- Rob Verschoor
>>
>> Certified Professional DBA for Sybase ASE, IQ, Replication
>> Server
>>
>> Author of Sybase books (order online at
>> www.sypron.nl/shop): "Tips, Tricks & Recipes for Sybase
>> ASE" "The Complete Sybase IQ Quick Reference Guide"
>> "The Complete Sybase ASE Quick Reference Guide"
>> "The Complete Sybase Replication Server Quick Reference
>> Guide"
>>
>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
>> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
>> Commerce 27138666
>> ----------------------------------------------------------
>> -------