How can we help you today? How can we help you today?

4.0.3 Adds ' when it shouldn't while indenting

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
MikeyC
0

Comments

4 comments

  • Anu D
    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 ?
    Anu D
    0
  • fordc03
    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.
    fordc03
    0
  • MikeyC
    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 support@red-gate.com.

    (Just for reference the options I have checked are:
    * Add parentheses
    * Single quotation mark
    * Comment mark
    * Square bracket)
    MikeyC
    0
  • peter.peart
    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
    0

Add comment

Please sign in to leave a comment.