SharePoint 2007 Error - some part of your SQL statement is nested too deeply RRS feed

  • Question

  • Hi All,

    Im working with an application on SharePoint 2007, I encountered an issue where the list item unable to view.

    It hit error 1309 "Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries"

    how can I solve this issue?

    Thank you in advanced.


    Thursday, December 29, 2011 3:16 AM


All replies

  • In addition, how can get to know the SQL query structure? how the SQL statement was nested too deeply.


    Thursday, December 29, 2011 3:57 AM
  • Sounds as if your application uses complex CAML queries: http://rapidapplicationdevelopment.blogspot.com/2007/05/caml-nested-too-deep.html
    Stefan Goßner
    Senior Escalation Engineer - Microsoft CSS
    This post is provided "AS IS" with no warrenties and confers no rights.
    • Marked as answer by Pengyu Zhao Thursday, January 5, 2012 2:00 AM
    Thursday, December 29, 2011 11:54 AM
  • Hello Stefan,

                   This links shows why the CAML query is producing this issue and how to fix this, but in my case I have just my sharepoint list and everything is Out of box.. query generated is by sharepoint itself to view the item's details... when i click for viewitem it says expected error occured and i checked the event logs the same "some part of your SQL statement is nested too deeply" error is thrown... it is only for 2 items out of 200... i have cleared the workflow history but for no use... can u help me with this??

    Friday, December 21, 2012 1:40 PM