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

[feature request] Add 'N' to unicode type literal strings

Hi,

Is it possible to format below code
DECLARE @a VARCHAR(200);
SELECT  @a = 'asdf';
DECLARE @b NVARCHAR(200);
SELECT  @b = 'asdf';

to
DECLARE @a VARCHAR(200);
SELECT  @a = 'asdf';
DECLARE @b NVARCHAR(200);
SELECT  @b = N'asdf';

Thanks.
ogrishman
0

Comments

3 comments

  • kondrich
    Oh yes. This would be great!
    kondrich
    0
  • Aaron L
    Hi ogrishman,

    This sounds like a cool idea!

    We're using UserVoice to track feature requests like this as it helps us track the requests and lets other users vote on it (helping us prioritize which features to work on next).

    It'd be great if you could add any requests to our UserVoice to increase their visibility.

    Thanks,
    Aaron.
    Aaron L
    0
  • KouryouChairudo
    This is a great feature. I love it. I tested it this morning but I have found an issue.
    DECLARE @UnicodeText NVARCHAR(100) = 'une génération désenchantée'
    
    will change to 
    DECLARE @UnicodeText NVARCHAR(100) = 'une génération désenchantée'
    
    So the inline assignment isn't changed.

    Also doesn't work for insert and updates.
    KouryouChairudo
    0

Add comment

Please sign in to leave a comment.