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

ogrishmanogrishman Posts: 81 Bronze 4
edited November 28, 2014 6:02AM in SQL Prompt
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.

Comments

  • kondrichkondrich Posts: 80 Bronze 2
    Oh yes. This would be great!
    Regards, Klaus
  • Aaron LAaron L Posts: 596 New member
    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.
  • KouryouChairudo@WorkKouryouChairudo@Work Posts: 3 Bronze 2
    edited March 29, 2018 6:32AM
    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.
Sign In or Register to comment.