SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Indepth SPID information


Indepth SPID information

Author
Message
AmarPo
AmarPo
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 Visits: 220
Comments posted to this topic are about the item Indepth SPID information

Amar
RML51
RML51
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1439 Visits: 1612
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 ' '.



AmarPo
AmarPo
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 Visits: 220
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 Smile

Amar

Amar
Attachments
Ops_SP_DetailSPID.doc (21 views, 29.00 KB)
RML51
RML51
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1439 Visits: 1612
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 Smile

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. Smile



AmarPo
AmarPo
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 Visits: 220
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
Ruth Chen-435471
Ruth Chen-435471
SSC-Enthusiastic
SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)

Group: General Forum Members
Points: 199 Visits: 243
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!
AmarPo
AmarPo
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 Visits: 220
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search