views:

23

answers:

1

Hi All,

I am getting this error when I run a certain SQL statement. I have looked into this and haven't really got anywhere.

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

I cannot post the actual query with data as it contains some sensative information but basically I am creating an image map using an editor (similar to FCKEditor) and posting that to my database. Everything is Ok up to a point, then I go to add another area tag to the map and it breaks. I don't think this is size of data related as I can type in more characters that the area tag takes and it will still work. For instance, it will raise the error when I add

<area id="" />

but is ok when I write a longer piece of text like:

this is some test text and I am trying to test if it is a character limit.

The error occurs when I run the statement in SQL Management Studio as well, not just in my code. Is it something to do with the double quotes? Has SQL had as many as it can cope with?

I am using Windows SQL Server 2008 Web Edition.

Would appreciate some help, thanks.

EDIT: It turns out, all " are being replaced with ' + CHAR(34) + ', replacing all these with actual " in the SQL statement has resolved these. Now I just need to figure out why these are being replaced.

A: 

It turns out, all " are being replaced with ' + CHAR(34) + ', replacing all these with actual " in the SQL statement has resolved this issue.

webnoob