• You can get the location of the characters you are looking for by using patindex

    e.g.

    declare @a varchar(10)

    set @a = 'abcd a_b'

    select patindex('%[ _]%', @a)

    If you need to remove things, you can use replace, substring, ...

    You can read on string manipulation functions that are available in T-SQL on http://msdn.microsoft.com/en-us/library/ms181984.aspx

    However, if you need something more complicated, you may way to look at CLR functions.

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software