Load odd column data to local file

Su Si 60 Reputation points
2024-11-26T08:48:26.32+00:00

Is it possible to load odd column data from sql server table to flat file in ssis package?

SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. ZoeHui-MSFT 41,491 Reputation points
    2024-11-26T09:01:54.7566667+00:00

    Hi @Su Si,

    When you create the source manager, you may use below command.

    Select * from yourtable where (RowID % 2) = 1
    
    
    

    If you do not have the RowID, you may use ROW_NUMBER().

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2024-11-26T09:25:39.5866667+00:00

    Create a view with only that columns you want to export.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.