Misplaced Pages

Split: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 09:54, 27 March 2013 editShirt58 (talk | contribs)Autopatrolled, Administrators67,662 edits See also: * Australian Labor Party split of 1955, in the context of Politics of Australia: Term used by historians, journalists and social scientists← Previous edit Revision as of 13:24, 4 June 2013 edit undo119.160.193.154 (talk)No edit summaryNext edit →
Line 24: Line 24:
* Split, a ] * Split, a ]
* Split Dynasty, an alien species of the '']'' game series * Split Dynasty, an alien species of the '']'' game series
<div

==Sports== ==Sports==
* ], a body position * ], a body position
Line 67: Line 67:


{{disambiguation}} {{disambiguation}}

/****** Object: UserDefinedFunction . Script Date: 6/3/2013 2:37:57 PM ******/
DROP FUNCTION .
GO

/****** Object: UserDefinedFunction . Script Date: 6/3/2013 2:37:57 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE FUNCTION . (
@SourceString sql_variant,
@Delimiter nvarchar(10) = N','
)
RETURNS @Values TABLE( Position smallint IDENTITY, cValue varchar( 8000 ) , ncValue nvarchar( 4000 ) )
AS
BEGIN
IF(ISNULL(@SourceString,'')<>'')
BEGIN
DECLARE @NormalString varchar( 8000 ) , @NationalString nvarchar( 4000 ) ,
@NormalDelimiter varchar( 10 ) , @NationalDelimiter nvarchar( 10 ) ,
@IsNationalChar bit , @Position int ,
@NormalValue varchar( 8000 ) , @NationalValue nvarchar( 4000 )
SET @Delimiter = COALESCE( @Delimiter, N',' )
SET @IsNationalChar = CASE
WHEN SQL_VARIANT_PROPERTY( @SourceString , 'BaseType' ) IN ( 'char' , 'varchar' )
THEN 0
WHEN SQL_VARIANT_PROPERTY( @SourceString , 'BaseType' ) IN ( 'nchar' , 'nvarchar' )
THEN 1
END
IF @IsNationalChar IS NULL RETURN
IF @IsNationalChar = 0
BEGIN
SET @NormalDelimiter = @Delimiter
SET @NormalString = CAST( @SourceString AS varchar(8000) )

IF LEFT( @NormalString , LEN( @NormalDelimiter ) ) = @NormalDelimiter
SET @NormalString = SUBSTRING( @NormalString, LEN( @NormalDelimiter ) + 1, 8000 )
IF RIGHT( @NormalString , LEN( @NormalDelimiter ) ) <> @NormalDelimiter
SET @NormalString = @NormalString + @NormalDelimiter
WHILE( 1 = 1 )
BEGIN
SET @Position = CHARINDEX( @NormalDelimiter , @NormalString ) - 1
IF @Position <= 0 BREAK
SET @NormalValue = LEFT( @NormalString , @Position )
SET @NormalString = STUFF( @NormalString , 1 , @Position + LEN( @NormalDelimiter ), '' )
INSERT INTO @Values ( cValue ) VALUES( @NormalValue )
END
END
ELSE IF @IsNationalChar = 1
BEGIN
SET @NationalDelimiter = @Delimiter
SET @NationalString = CAST( @SourceString AS varchar(8000) )

IF LEFT( @NationalString , LEN( @NationalDelimiter ) ) = @NationalDelimiter
SET @NationalString = SUBSTRING( @NationalString, LEN( @NationalDelimiter ) + 1, 4000 )
IF RIGHT( @NationalString , LEN( @NationalDelimiter ) ) <> @NationalDelimiter
SET @NationalString = @NationalString + @NationalDelimiter
WHILE( 1 = 1 )
BEGIN
SET @Position = CHARINDEX( @NationalDelimiter , @NationalString ) - 1
IF @Position <= 0 BREAK
SET @NationalValue = LEFT( @NationalString , @Position )
SET @NationalString = STUFF( @NationalString , 1 , @Position + LEN( @NationalDelimiter ), '' )
INSERT INTO @Values ( ncValue ) VALUES( @NationalValue )
END
END
END
RETURN
END


GO

Revision as of 13:24, 4 June 2013

For the splitting of Misplaced Pages articles, see WP:SPLIT

Split(s) or The Split may refer to:

Places

Music

Games

<div

Sports

Science

Film and television

Other uses

See also

Topics referred to by the same term Disambiguation iconThis disambiguation page lists articles associated with the title Split.
If an internal link led you here, you may wish to change the link to point directly to the intended article.

/****** Object: UserDefinedFunction . Script Date: 6/3/2013 2:37:57 PM ******/ DROP FUNCTION . GO

/****** Object: UserDefinedFunction . Script Date: 6/3/2013 2:37:57 PM ******/ SET ANSI_NULLS ON GO

SET QUOTED_IDENTIFIER ON GO

CREATE FUNCTION . (

   @SourceString sql_variant,
   @Delimiter nvarchar(10) = N','

) RETURNS @Values TABLE( Position smallint IDENTITY, cValue varchar( 8000 ) , ncValue nvarchar( 4000 ) ) AS BEGIN IF(ISNULL(@SourceString,)<>) BEGIN

   DECLARE @NormalString    varchar( 8000 ) , @NationalString    nvarchar( 4000 ) ,
           @NormalDelimiter varchar( 10 )   , @NationalDelimiter nvarchar( 10 )   ,
           @IsNationalChar  bit             , @Position          int              ,
           @NormalValue     varchar( 8000 ) , @NationalValue     nvarchar( 4000 )
   SET @Delimiter      = COALESCE( @Delimiter, N',' )
   SET @IsNationalChar = CASE
                           WHEN SQL_VARIANT_PROPERTY( @SourceString , 'BaseType' ) IN ( 'char' , 'varchar' )
                           THEN 0
                           WHEN SQL_VARIANT_PROPERTY( @SourceString , 'BaseType' ) IN ( 'nchar' , 'nvarchar' )
                           THEN 1
                         END
   IF @IsNationalChar IS NULL RETURN
   IF @IsNationalChar = 0
   BEGIN
           SET @NormalDelimiter = @Delimiter
           SET @NormalString    = CAST( @SourceString AS varchar(8000) )
           IF LEFT( @NormalString , LEN( @NormalDelimiter ) ) = @NormalDelimiter
                   SET @NormalString = SUBSTRING( @NormalString, LEN( @NormalDelimiter ) + 1, 8000 )
           IF RIGHT( @NormalString , LEN( @NormalDelimiter ) ) <> @NormalDelimiter
                   SET @NormalString = @NormalString + @NormalDelimiter
           WHILE( 1 = 1 )
           BEGIN
                   SET @Position     = CHARINDEX( @NormalDelimiter , @NormalString ) - 1
                   IF @Position <= 0 BREAK
                   SET @NormalValue  = LEFT( @NormalString , @Position )
                   SET @NormalString = STUFF( @NormalString , 1 , @Position + LEN( @NormalDelimiter ),  )
                   INSERT INTO @Values ( cValue ) VALUES( @NormalValue )
           END
   END
   ELSE IF @IsNationalChar = 1
   BEGIN
           SET @NationalDelimiter = @Delimiter
           SET @NationalString    = CAST( @SourceString AS varchar(8000) )
           IF LEFT( @NationalString , LEN( @NationalDelimiter ) ) = @NationalDelimiter
                   SET @NationalString = SUBSTRING( @NationalString, LEN( @NationalDelimiter ) + 1, 4000 )
           IF RIGHT( @NationalString , LEN( @NationalDelimiter ) ) <> @NationalDelimiter
                   SET @NationalString = @NationalString + @NationalDelimiter
           WHILE( 1 = 1 )
           BEGIN
                   SET @Position     = CHARINDEX( @NationalDelimiter , @NationalString ) - 1
                   IF @Position <= 0 BREAK
                   SET @NationalValue  = LEFT( @NationalString , @Position )
                   SET @NationalString = STUFF( @NationalString , 1 , @Position + LEN( @NationalDelimiter ),  )
                   INSERT INTO @Values ( ncValue ) VALUES( @NationalValue )
           END
   END
   END
   RETURN

END


GO

Category: