none
Can SSIS package handle special characters?

    Frage

  • We have an existing package at the moment. we have a requirement to introduce special characters. Does SSIS package supports the following special characters.

    !

    !!!

    "

    """

    #

    ###

    $

    $$$

    %

    %%%

    &

    &&&

    (

    (((

    )

    )))

    *

    ***

    ,

    ,,,

    :

    :::

    ;

    ;;;

    ?

    ???

    @

    @@@

    [

    [[[

    \

    \\\

    ]

    ]]]

    ^

    ^^^

    _

    ___

    `

    ```

    {

    {{{

    |

    |||

    }

    }}}

    ~

    ~~~

    £

    £££

    <<< 

    >>> 

    ¬

    ¬¬¬

    .

    '

     

    /


    Regards

    Montag, 2. September 2013 08:46

Alle Antworten

  • Hi! Sudhir ,

    We have similar requirement and use SQL UDF and view to achieve this.

    In data flow task, you can replace the original DB Source from physical table to view which uses UDF to remove the special charaters.

    Here is sample SQL.

    -- Table with Special Characters

    CREATE TABLE [dbo].[SPECIAL_CHAR]( [Symbol] [varchar](5) NOT NULL ) ON [PRIMARY] INSERT INTO SPECIAL_CHAR VALUES(';') INSERT INTO SPECIAL_CHAR VALUES('<') INSERT INTO SPECIAL_CHAR VALUES('>') --UDF to remove special character CREATE FUNCTION [dbo].[fn_REMOVE_SPECIAL_CHAR] ( @InputString VARCHAR(500) ) RETURNS VARCHAR(500) AS BEGIN SELECT @InputString = REPLACE(@InputString, S.Symbol, '') FROM SPECIAL_CHAR S RETURN @InputString END

    --Sample to see if it works SELECT dbo.[fn_REMOVE_SPECIAL_CHAR]('AAA;BB>CC<')

    --Use above tricks to create a view and use it to be your data source

    CREATE view [dbo].[V_SSIS_DATASOURCE]
    as

    SELECT dbo.[fn_REMOVE_SPECIAL_CHAR](NAME), CODE FROM DUMMY_SOURCE

    Hope this helps.

    Regards.


    • Als Antwort vorgeschlagen Ramyakranthi Dienstag, 17. September 2013 06:28
    Mittwoch, 11. September 2013 03:14