Indepth SPID information

  • Comments posted to this topic are about the item Indepth SPID information

    Amar

  • I receive parsing errors:

    Msg 102, Level 15, State 1, Procedure OPS_SP_DetailSPID, Line 6

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Procedure OPS_SP_DetailSPID, Line 13

    Incorrect syntax near '?'.

  • Hello,

    Thank you for bringing this to my attention.

    The original code I submitted parses fine. But you are right there is something going on when you copy it off from the website; I noticed the same problem. Even when I parsed the code without the failing lines (6 & 13) it fails with the same "Incorrect syntax" error. I will look into the cause and make the appropriate changes.

    Also, note that in the drop statement the object is not correct although this doesn't affect creation of the SP itself. I will fix this too once I figure out how to edit submitted/approved code. For the time being you may use the code file I attached to this post. I hope it works smoohtly 🙂

    Amar

    Amar

  • Amar Pogaku (1/9/2009)


    Hello,

    Thank you for bringing this to my attention.

    The original code I submitted parses fine. But you are right there is something going on when you copy it off from the website; I noticed the same problem. Even when I parsed the code without the failing lines (6 & 13) it fails with the same "Incorrect syntax" error. I will look into the cause and make the appropriate changes.

    Also, note that in the drop statement the object is not correct although this doesn't affect creation of the SP itself. I will fix this too once I figure out how to edit submitted/approved code. For the time being you may use the code file I attached to this post. I hope it works smoohtly 🙂

    Amar

    I've seen several other scripts that won't parse cleanly after they've been posted/cut/pasted from the website. I doubt that your original code had an error.

    Thanks for the attached document. That script worked well for me. 🙂

  • I have figured out the reason behind the false syntax issue: TAB spaces! The code editor on the site doesn't seem to format tabbed spaces well and must be inserting some non-SQL characters instead causing the copied code to not parse properly. (I haven't tried running the code taken from the site in a character analyzing tool but I am sure it will find some unexpected characters.)

    I reposted the code without any tabbed spaces and have successfully parsed the copied code from the site.

    Also, I made a slight change to the code that will improve the data returned in the SQLStatementText and SQLBatchText columns. Please use the updated code.

    Amar

  • Thanks Amar!

    I copied your code again, and now getting this message:

    Msg 170, Level 15, State 1, Procedure OPS_SP_DetailSPID, Line 12

    Line 12: Incorrect syntax near 'max'.

    Thank you very much!

  • Ruth,

    I sent you a private message last week about this error. Just posting a message here in case you didn't receive it.

    The code taken from the website does parse fine for me and seemingly for few others too. So I am not sure what's different in your case. In any case, I'd be glad to email you the code directly if you provide me with your email (through a private message).

    Amar

    Amar

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply