Using case in my expression in ssis

lilly girl 20 Reputation points
2024-01-22T15:44:03.74+00:00

How to use case in my expression. Can anyone suggest on how to do this .

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,456 questions
0 comments No comments
{count} votes

Accepted answer
  1. Azar 26,180 Reputation points MVP
    2024-01-22T15:50:25.3566667+00:00

    Hey there, lilly girl try this doc below Or you may refer to https://www.mssqltips.com/sqlservertip/2924/case-statement-functionality-in-sql-server-integration-services-derived-column-transformation/ When selecting data from a database using T-SQL, one can use CASE statements to derive new columns based on data in the database. However, when reading data from files in SQL Server Integration Services (SSIS) there isn't a CASE statement readily available when new columns need to be derived or existing values need to be replaced. You may try with

    Field == "TrueCondition1" ? “True” : ( Field == "TrueCondition2" ? “True” : ( Field == "TrueCondition3 " ? “True” : ( Field == "TrueCondition4" ? “True” : “False"  ) ) )
    
    
    

    If this helps kindly accept the answer thanks much.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Zahid Butt 956 Reputation points
    2024-01-22T15:54:27.7933333+00:00
    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.