SQLPrompt format crashes crashes ssms

gokhanvarol@gmail.com[email protected] Posts: 12
edited March 5, 2013 6:35PM in SQL Prompt Previous Versions
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
)

Comments

  • 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
  • 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.
  • PDinCAPDinCA Posts: 640 Silver 1
    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.
    Jesus Christ: Lunatic, liar or Lord?
    Decide wisely...
  • We have this logged in our bug tracking system under the internal reference number SP-4639
    Manfred Castro
    Product Support
    Red Gate Software
Sign In or Register to comment.