Home Forums SQL Server 2008 SQL Server Newbies Ignore/Skip data coming from falt file and loading into SQL table RE: Ignore/Skip data coming from falt file and loading into SQL table

  • Grass (12/18/2012)


    I want to know from T-SQL(store proc) in a staging table and also SSIS.

    In T-SQL you'd simply use a CASE satement in your INSERT/Update statements, something like

    CASE WHEN LEFT( column, 11) = 'Not Defined' THEN NULL ELSE column END

    In SSIS you'd use a derived column and null the value in the column when it met your criteria.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA