Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Error in function.

Author  Topic 

vikky
Yak Posting Veteran

54 Posts

Posted - 2011-08-29 : 07:52:07
HI,

Please help me

i call function with in same function
while executing it gives following error message.

Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).


any solutions to solve above error.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-29 : 07:58:48
it means you're mesting a function within another function and its going over permissible limit of 32 levels. perhaps you can explain what you're trying to do

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

vikky
Yak Posting Veteran

54 Posts

Posted - 2011-08-29 : 08:18:02
HI,

I have an function which returns working times for each employee which are already defined in another tables. If any employee work on weeklyoff and then take a leaves alternative day. So that i have to show working times of weeklyoff of alternative day( which is the day he/she taking leave). For this i am calling same function with diff dates of employees.

function inputs are date and employeeid.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-29 : 08:29:35
why should you call function multiple times? you can just gets details onto table and then use join or apply operator to get related weeklyoff working detail. I assume you've some column to denote which days comp off corresponds to which holiday

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -