Solomon Rutzky

My feedback

  1. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    This is still an issue for SSMS v18.0 RC1 (SQL Server Management Studio 15.0.18098.0).

    ALSO, to clarify the originally stated test cases above: the two cases that produce an error (the 3rd and 6th examples) only produce the error IF they start at the FIRST character position of the line. If you add any white-space to the beginning of the line, then they parse correctly. Along these lines, I tried a variation of the 6th example, spread across multiple lines. It also gets an error, but it's different as there are now two errors:

    ---------------------------------------------------------------
    /* first /* middle1 *//* middle2
    */
    GO
    last */
    ---------------------------------------------------------------

    gets:
    ---------------------------------------------------------------
    Msg 113, Level 15, State 1, Line XXXXX (line with GO)
    Missing end comment mark '*/'.
    Msg 102, Level 15, State 1, Line XXXXX + 1 (line after GO)
    Incorrect syntax near '*'.
    ---------------------------------------------------------------

    P.S. It would be super great if this horribly inadequate UserVoice system actually allowed us to post code that would preserve spacing, etc. Come on, it's 2019 already and nearly every other site out there has been able to do this basic stuff for years. There are open-source libraries for processing mark-down, so there is really no excuse for this site being 10 - 15 years behind the rest of the world.

    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    This is still an issue for SSMS v18.0 Preview 7 (SQL Server Management Studio 15.0.18092.0).

    I have not tested in the newest SQLCMD that should come with SQL Server 2019 CTP 2.3, but I assume it uses the same parsing logic and would thus have the same issue.

    Solomon Rutzky supported this idea  · 
    An error occurred while saving the comment
  2. 16 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Other  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky supported this idea  · 
  3. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    I just tested this in SSMS 18.0 RC1 (SQL Server Management Studio 15.0.18098.0) and it is still a problem. Please fix! And, wouldn't this also affect SMO?

    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    To be clearer about the parameters that have default values, the following query filters out parameters that do not have defaults (else it is more difficult to see those that have NULL for the value simply because no default value was ever set):

    SELECT [default_value], *
    FROM sys.parameters
    WHERE [object_id] = OBJECT_ID(N'SQL#.DB_BulkCopy')
    AND [has_default_value] = 1
    ORDER BY [parameter_id];

    ALSO, since the DB_BulkCopy stored procedure currently has non-NULL defaults for the INT parameters, I just changed one to NULL to see if it was only NVARCHAR parameters that are affected by this bug. After changing the @NotifyAfterRows parameter to have a default value of NULL, it was scripted out as follows:

    @NotifyAfterRows [int] = ,

    which produces a syntax error, unlike using N'' in place of NULL for the NVARCHAR parameters. So yes, this bug affects more than just NVARCHAR parameters.

    Solomon Rutzky shared this idea  · 
  4. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    P.S. I am only voting for this issue because this horrible UserVoice system does not provide any other mechanism for getting notifications for changes or comments on items you did not submit 😾 .

    Solomon Rutzky supported this idea  · 
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    Hello Niklas. You are misunderstanding how square brackets are escaped in delimited identifiers that use square brackets as the delimiter. It is _only_ the right square brackets that are escaped; left square brackets are _not_ escaped. Hence, the "actual behavior" is correct, and the "expected behavior" is an invalid expectation.

    For example, the following query:
    --------------------------------------------------------------
    SELECT 1 AS [[[As]]], 2 AS [[[[[Bt]]]]];
    --------------------------------------------------------------

    returns:
    --------------------------------------------------------------
    [[As] ..... [[[[Bt]]
    1 ............ 2
    --------------------------------------------------------------

    For a comprehensive list of rules describing how identifiers behave, please see:

    "Completely Complete List of Rules for T-SQL Identifiers" ( https://sqlquantumleap.com/reference/completely-complete-list-of-rules-for-t-sql-identifiers )

    This item is a non-issue and can be closed.

    Take care,
    Solomon ( https://SqlQuantumLeap.com/ )
    SQL# SQLCLR Library ( https://SQLsharp.com/ )

  5. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky supported this idea  · 
  6. 336 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  9 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky supported this idea  · 
  7. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    I just ran these tests on CTP 2.4 and the problem still exists.

    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    I just ran these tests on CTP 2.3 and the problem still exists.

    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    I just ran these tests on CTP 2.2 and the problem still exists.

    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    To be clear, the truncation doesn't affect only Extended ASCII characters, it chops off whatever is on the right-side of the string (i.e. the end of the string). It's just that it is the Extended ASCII characters which cause there to be truncation in the first place. For example:

    -------------------------------------------------------------------------------
    -- Try this in any DB with a non-UTF8 [SQL_]Latin1_General default Collation:

    -- Convert to UTF-8:
    SELECT '§x' COLLATE Latin1_General_100_CI_AS_SC_UTF8;
    -- § (2-byte character fits in the two allocated bytes, leaving no room for char #2)

    SELECT 'x§' COLLATE Latin1_General_100_CI_AS_SC_UTF8;
    -- x (1-byte character fits in the two allocated bytes, leaving only 1 byte left;
    -- not enough room for 2-byte character so 2nd byte is left empty)
    -------------------------------------------------------------------------------

    Solomon Rutzky shared this idea  · 
  8. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    6 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    I just ran these tests on CTP 2.4 and the problem still exists.

    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    I just ran these tests on CTP 2.3 and the problem still exists.

    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    I just ran these tests on CTP 2.2 and the problem still exists.

    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    I just ran these tests on CTP 2.1 and the problem still exists.

    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    Hello @pmasl : Please take a closer look at my description and example. It is clear from the "??" returned that both A) the value was converted into UTF-16, hence the double question mark instead of a single question mark as it is a Supplementary Character, and B) the value was then converted back to Code Page 1252, thanks to Collation Precedence, hence the question marks instead of the original character.

    However, if you prefer to see it differently, as an actual comparison, then execute the following (the results are included in comments). There is no way that the same UTF-8 character should match both "??" in Code Page 1252, AND "𨕷" in UTF-8.

    -------------------------
    USE [UTF8];

    DECLARE @Test2 TABLE
    (
    [CP1252] VARCHAR(50) COLLATE Latin1_General_100_CI_AS,
    [UTF8] VARCHAR(50) COLLATE Latin1_General_100_CI_AS_SC_UTF8
    );

    INSERT INTO @Test2 ([CP1252], [UTF8]) VALUES ('??', '𨕷');
    SELECT * FROM @Test2;
    -- ?? 𨕷

    SELECT * FROM @Test2 WHERE [CP1252] = '𨕷';
    -- ?? 𨕷

    SELECT * FROM @Test2 WHERE [UTF8] = '𨕷';
    -- ?? 𨕷
    -------------------------

    Solomon Rutzky shared this idea  · 
  9. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    If it was not clear from my previous comment, this item is a non-issue and can be closed. Thanks.

    Solomon Rutzky supported this idea  · 
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    The problem here is that UNCOMPRESS is not an alias for DECOMPRESS. It is an entirely different operation. UNCOMPRESS assumes that every byte of input is actually a Unicode code point in the range of U+0001 - U+00FF (i.e. values 1 - 255). This is the range that has 0x00 as the first byte, and so the "compression" was to simply remove the 0x00 bytes. The UNCOMPRESS function merely adds the 0x00 byte back in for each byte of the input value.

    For full details, please see my analysis of this function at:

    "What Does the Undocumented UNCOMPRESS Function Do?" ( https://sqlquantumleap.com/2019/02/26/what-does-the-undocumented-uncompress-function-do/ ).

    Also, please ignore at least one upvote on this item (currently the only vote for this item), as the ONLY reason I am voting for it is because this horrible UserVoice system does not provide any other mechanism for being notified of changes or responses to an item.

  10. 4 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky supported this idea  · 
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    How do you not have a scrolling drop-down list for "Show settings for:" ? I have never _not_ seen "Grid Results" in this list. But I do see in the attached screenshot that there is no scrolling list in your drop-down, it just ends at "CallStack Windows", which is really odd.

    I am seeing the expected long, scrollable list in SSMS 17.9.1 and 18.0 Preview 7. My "Help" -> "About..." info (for both versions) shows:

    -------- SSMS 17.9.1 ---------------------------------------------------
    Microsoft SQL Server Management Studio 14.0.17289.0
    Microsoft Analysis Services Client Tools 14.0.1016.283
    Microsoft Data Access Components (MDAC) 10.0.17763.1
    Microsoft MSXML 3.0 5.0 6.0
    Microsoft Internet Explorer 9.11.17763.0
    Microsoft .NET Framework 4.0.30319.42000
    Operating System 6.3.17763
    --------------------------------------------------------------------------

    -------- SSMS 18.0 Preview 7 ------------------------------------------
    SQL Server Management Studio 15.0.18092.0
    Microsoft Analysis Services Client Tools 15.0.1000.65
    Microsoft Data Access Components (MDAC) 10.0.17763.1
    Microsoft MSXML 3.0 5.0 6.0
    Microsoft Internet Explorer 9.11.17763.0
    Microsoft .NET Framework 4.0.30319.42000
    Operating System 6.3.17763
    --------------------------------------------------------------------------

  11. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky shared this idea  · 
  12. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky shared this idea  · 
  13. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky shared this idea  · 
  14. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky supported this idea  · 
  15. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 3

    <=-=May 8 2015 11:31AM=-=>

    Hi Xor88,

    Thank you for your inquiry. Currently, SQL Server does not allow changing collations on scalars that have a different collation explicitly specified for them. In your example, the code that assigns the value to nameBIN2 inside CROSS APPLY, explicitly specifies the collation for nameBIN2 to be BIN2. An attempt to change that collation later in the projection portion of the query leads to SQL Server erroring out with the error 445 (COLLATE clause cannot be used on expressions containing a COLLATE clause).

    Since your original logic involves inserting data into a temporary table #t, it would make sense to use the desired collation once you start querying #t later on. That way, you can specify the projection collation in the SELECT FROM #t.

    Thanks,
    Sergey Ten.

    <=-=May 8 2015 1:46PM=-=>

    Sergey,

    thanks for the response. You are suggesting to materialize…

    Solomon Rutzky supported this idea  · 
  16. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    Related bug report for "sp_validname":

    sp_validname incorrectly returns 1 / true if name being checked contains code point U+FFFF which is invalid, even for delimited identifiers ( https://feedback.azure.com/forums/908035-sql-server/suggestions/37049194-sp-validname-incorrectly-returns-1-true-if-name ).

    Solomon Rutzky shared this idea  · 
  17. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky shared this idea  · 
  18. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky supported this idea  · 
  19. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Solomon Rutzky commented  · 

    This appears to be fixed in CTP 2.3.

    P.S. Please see "Native UTF-8 Support in SQL Server 2019: Savior or False Prophet?" ( https://sqlquantumleap.com/2018/09/28/native-utf-8-support-in-sql-server-2019-savior-false-prophet-or-both/ ) for a detailed analysis of the new UTF-8 feature.

    Solomon Rutzky supported this idea  · 
  20. 23 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL Database  ·  Flag idea as inappropriate…  ·  Admin →
    Solomon Rutzky supported this idea  · 

Feedback and Knowledge Base