Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Indepth SPID information Expand / Collapse
Author
Message
Posted Saturday, January 3, 2009 6:47 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 23, 2013 8:08 PM
Points: 40, Visits: 214
Comments posted to this topic are about the item Indepth SPID information

Amar
Post #629393
Posted Friday, January 9, 2009 9:17 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, February 4, 2014 9:35 AM
Points: 1,277, Visits: 1,612
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 ' '.



Post #633550
Posted Friday, January 9, 2009 6:57 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 23, 2013 8:08 PM
Points: 40, Visits: 214
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

  Post Attachments 
Ops_SP_DetailSPID.doc (12 views, 29.00 KB)
Post #634039
Posted Monday, January 12, 2009 9:37 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, February 4, 2014 9:35 AM
Points: 1,277, Visits: 1,612
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. :)



Post #634793
Posted Monday, January 12, 2009 1:27 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 23, 2013 8:08 PM
Points: 40, Visits: 214
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
Post #635014
Posted Friday, February 6, 2009 8:14 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, March 27, 2012 7:40 AM
Points: 195, 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!
Post #651707
Posted Friday, February 13, 2009 7:36 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 23, 2013 8:08 PM
Points: 40, Visits: 214
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
Post #657077
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse