4.0.3 Adds ' when it shouldn't while indenting

CodantiMCodantiM Posts: 245
edited December 2, 2009 12:41PM in SQL Prompt Previous Versions
Given this code:
SELECT 
<select start>'Test' AS Field1,
'Test2' AS Field2,
''<select end> AS Field3
INTO #Temp

And having the code between <select start> and <select end> selected when you hit TAB to indent it.

This is what you get:
SELECT 
	'Test' AS Field1,
	'Test2' AS Field2,
	''' AS Field3
INTO #Temp

while this is what I expect:
SELECT 
	'Test' AS Field1,
	'Test2' AS Field2,
	'' AS Field3
INTO #Temp

Comments

  • Many thanks for your post Michael.

    As per steps provided by you I tried to replicate the issue but it works fine for me.

    Can you kindly email me the screenshot of the settings:
    SQL Prompt 4 --> Options --> Inserted Code --> Special Characters ?
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: [email protected]
  • fordc03fordc03 Posts: 49 Bronze 2
    CodantiM wrote:
    Given this code:
    SELECT 
    &lt;select start&gt;'Test' AS Field1,
    'Test2' AS Field2,
    ''&lt;select end&gt; AS Field3
    INTO #Temp
    

    And having the code between <select start> and <select end> selected when you hit TAB to indent it.

    This is what you get:
    SELECT 
    	'Test' AS Field1,
    	'Test2' AS Field2,
    	''' AS Field3
    INTO #Temp
    

    while this is what I expect:
    SELECT 
    	'Test' AS Field1,
    	'Test2' AS Field2,
    	'' AS Field3
    INTO #Temp
    

    this happened to me as well earlier after installing the update, although I couldn't get it to do it again after re-selecting the start and end points and tabbing again.

    Just wanted to confirm you're not crazy. =) I just don't know how to duplicate it myself, but when it happened it was quite annoying. If I can duplicate before anyone else posts I'll do so.
  • Many thanks for your post Michael.

    As per steps provided by you I tried to replicate the issue but it works fine for me.

    Can you kindly email me the screenshot of the settings:
    SQL Prompt 4 --> Options --> Inserted Code --> Special Characters ?

    I just sent the email to [email protected].

    (Just for reference the options I have checked are:
    * Add parentheses
    * Single quotation mark
    * Comment mark
    * Square bracket)
  • Just to follow up on this, I managed to reproduce this with Michael's assistance, and have now raised this as a bug within our tracking systems under reference number SP-2881.

    Pete
    Peter Peart
    Red Gate Software Ltd
    +44 (0)870 160 0037 ext. 8569
    1 866 RED GATE ext. 8569
Sign In or Register to comment.