| Author |
Message |
gokhanvarol@gmail.com
Joined: 03 Mar 2013 Posts: 6
|
Posted: Mon Mar 04, 2013 8:24 pm Post subject: SQLPrompt format crashes crashes ssms |
|
|
Formatting the snipplet with sqlprompt crashes ssms. Please advise
CREATE TABLE #ChangedKeysChildren
(
CntyCd CHAR(5) NULL
, PclId VARCHAR(45) NULL
, PclSeqNbr TINYINT NULL
,NameSeq tinyint NULL
,BEFORE_FullName] varchar(60) NULL
,AFTER_FullName] varchar(60) NULL
) |
|
| Back to top |
|
 |
Manfred.Castro
Joined: 23 Apr 2012 Posts: 127
|
Posted: Tue Mar 05, 2013 9:44 pm Post subject: |
|
|
Your issue appears to be caused by the un enclosed square brackets in your script.
if you remove the un enclosed square brackets
CREATE TABLE #ChangedKeysChildren
(
CntyCd CHAR(5) NULL
, PclId VARCHAR(45) NULL
, PclSeqNbr TINYINT NULL
,NameSeq tinyint NULL
,BEFORE_FullName varchar(60) NULL
,AFTER_FullName varchar(60) NULL
)
or close the square brackets
CREATE TABLE #ChangedKeysChildren
(
CntyCd CHAR(5) NULL
, PclId VARCHAR(45) NULL
, PclSeqNbr TINYINT NULL
,NameSeq tinyint NULL
,[BEFORE_FullName] varchar(60) NULL
,[AFTER_FullName] varchar(60) NULL
)
Format SQL works as expected. _________________ Manfred Castro
Product Support
Red Gate Software |
|
| Back to top |
|
 |
gokhanvarol@gmail.com
Joined: 03 Mar 2013 Posts: 6
|
Posted: Tue Mar 05, 2013 9:49 pm Post subject: The crash |
|
|
I know how to make it work by removing the bracket, but in any case sql prompt should not crash and take ssms down with it.
This piece of code was part of a longer (over 4500 lines) stored procedure which kept crashing on format, eventually I spent the time and find out what's crashing sqlprompt and posted here. |
|
| Back to top |
|
 |
PDinCA
Joined: 25 Jul 2005 Posts: 469 Location: Costa Mesa, CA, USA
|
Posted: Tue Mar 05, 2013 11:04 pm Post subject: |
|
|
SSMS2012 simply spins its wheels - the Cancel button in the reformat dialog is inoperative. Killing SSMS is the only solution.
I agree with the original poster - SQL Prompt ==> format SQL should NEVER kill SSMS of any vintage. |
|
| Back to top |
|
 |
Manfred.Castro
Joined: 23 Apr 2012 Posts: 127
|
Posted: Wed Mar 06, 2013 12:35 am Post subject: |
|
|
We have this logged in our bug tracking system under the internal reference number SP-4639 _________________ Manfred Castro
Product Support
Red Gate Software |
|
| Back to top |
|
 |
|