Update: Microsoft will be moving away from UserVoice sites on a product-by-product basis throughout the 2021 calendar year. We will leverage 1st party solutions for customer feedback. Learn more here.

Anonymous

My feedback

  1. 681 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    30 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 72

    <=-=Mar 10 2016 11:26AM=-=>

    It’s a shame that this was submitted as just a “suggestion”. It should actually be listed as a “bug” because there’s only a comparatively small set of use cases where enumeration of the result set of elements is not important.

    <=-=Mar 11 2016 12:47PM=-=>

    I agree that an order column is required; one example use case is where two lists are passed in, and ordinal positions in one list correspond to positions in the other.

    <=-=Mar 11 2016 3:12PM=-=>

    Please see the related suggestion: STRING_SPLIT needs “RemoveEmptyEntries” option, like String.Split in .NET ( https://connect.microsoft.com/SQLServer/feedback/details/2462002/ ).

    <=-=Mar 12 2016 12:02PM=-=>

    This kind of function is primarily needed for de-serializing previously serialized arrays of values of any type format-able as text.
    I therefore recommend to have the result set of this function work excellent with this use-case.

    With de-serialized arrays there is a need to…

    An error occurred while saving the comment
    Anonymous commented  · 

    RUN THIS INSTEAD OF STRING_SPLIT. IT's FAST ENOUGH AND PROVIDES WHAT YOU NEED:

    CREATE function [dbo].[Split]
    (
    @String varchar(max),
    @Delimiter varchar(10)
    )
    RETURNS @Results TABLE (f_id INT, item varchar(4000))
    AS
    BEGIN
    DECLARE @spacerepl char(1)=char(254)
    DECLARE @i int = 1, @f_id int = 1, @j int
    IF @Delimiter=' ' BEGIN
    SELECT @String=REPLACE(@String,@DELIMITER,@spacerepl)
    SELECT @DELIMITER=@spacerepl
    END
    IF ISNULL(@String,'')='' RETURN
    WHILE @i <= LEN(@String)
    BEGIN
    SELECT @j = CHARINDEX(@Delimiter, @String, @i)
    IF @j = 0 SELECT @j = len(@String) + 1
    INSERT @Results SELECT @f_id, RTRIM(SUBSTRING(@String, @i, @j - @i))
    SELECT @i = @j + LEN(@Delimiter)
    SELECT @f_id = @f_id + 1
    END
    RETURN
    END
    GO

  2. 1,796 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  733 comments  ·  SQL Server  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Anonymous commented  · 

    I dont install SSMS 18 without Debugger!

    An error occurred while saving the comment
    Anonymous commented  · 

    Please put the debugger back to SSMS. I get stuck on 17.9.1 because this feature is essentially for my work. What is the alternative?

Feedback and Knowledge Base