Exec (@strSQL)

Hi,

In SQL 2014.
Is there a maximum of time we can exec a dynamic SQL command inside a stored procedure?
In my stored procedure, I have 12. It runs the firts 11 ones and then it seems to hang at the 12th.
Manually I run the 12th query and it works fine. So it is not a syntax error in the string.
I
SET @strSQL = 'bla bla bla'
exec(@strSQL)
If (@@Rowcount > 0)
BEGIN
'Do something
End

Thanks!

Not that I know of. The more important question is why do you have so many?

Again the same old
sh!@#%$%

It could be a million things out of which you have to narrow it down to yours

Dynamic SQL .. please google search .. lots of articles

sommarskog.se/dynamic_sql.html

what i mean is

its a Pa@^^ in the A@#$%%

Another Thing

How to debug to find out the problem ?

is it a issue only with that particular statement ? put some other statement and see ?

Thinking on Paper ...
Break it down .. Terms .. Connecting ..

Hi all,

I thank you all for trying to help me.
For some unknow reason, it ran successfully to the end finally.

things like

FALSE positive ... FALSE negative