Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7811859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:19:08+00:00 2026-06-02T04:19:08+00:00

Working in SQL Server 2008. My first stab at an SSIS script and I

  • 0

Working in SQL Server 2008. My first stab at an SSIS script and I need to emulate some if/then conditional logic written in VB.net. I couldn’t find any previous questions dealing with nested conditions in expressions and believe I’m following what I’ve been able to uncover via google on nested conditions in a derived column.

I’m receiving an error while attempting to use nested conditions in the derived column transformation editor. The error I’m receiving indicates that SSIS could not parse my expression. The actual exception: “Exception from HRESULT: 0xC0204006 (Microsoft.SqlServer.DTSPipelineWrap)”

Questions for which the answers might immediately answer my question (and create a new problem):

  • is there a nesting levels limit?
  • can nesting be performed in the condition1 portion of [expression] ? [condition1] : [condition2]

I’ll give two snippets, the first is what I’m actually inserting, the second is a more reader-friendly version. Hopefully someone can point out my error.

Not sure that it has bearing, but please note that [BusArea] is a column derived in a previous step.

actual expression:

[BusArea] == "CCC" || [BusArea] == "NBU" || [BusArea] == "CA" ? (ISNULL([CASE_MORG]) or TRIM([CASE_MORG]) == "" ? ( ISNULL([TRX_MORG]) or TRIM([TRX_MORG]) == "" ? NULL(DT_WSTR,50) : [TRX_MORG]) : [CASE_MORG]) : (ISNULL([CASE_AGT]) or TRIM([CASE_AGT]) == "" ? ( ISNULL([TRX_AGT]) or TRIM([TRX_AGT]) == "" ? NULL(DT_WSTR,50) : [TRX_AGT]) : [CASE_AGT])

formatted for easier reading:

[BusArea] == "CCC" || [BusArea] == "NBU" || [BusArea] == "CA" ? 
    (ISNULL([CASE_MORG]) or TRIM([CASE_MORG]) == "" ?
        ( ISNULL([TRX_MORG]) or TRIM([TRX_MORG]) == "" ?
            NULL(DT_WSTR,50)
            : [TRX_MORG]
        )
        : [CASE_MORG]
    )
    : (ISNULL([CASE_AGT]) or TRIM([CASE_AGT]) == "" ?
        ( ISNULL([TRX_AGT]) or TRIM([TRX_AGT]) == "" ?
            NULL(DT_WSTR,50)
            : [TRX_AGT]
        )
        : [CASE_AGT]
    )
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:19:09+00:00Added an answer on June 2, 2026 at 4:19 am

    I don’t think there is any limit with nesting conditions. Even if there is one, I don’t think we will reach the limit in the packages that we create handle our business processes.

    You almost got everything correct. The issue with your conditional statement is that you have used or instead of ||

    I copied your exact statement and pasted in Derived Transformation within a Data Flow task and got an error because the package couldn’t parse the expression. I replaced all the or's with correct Logical OR (||) operator and the expression evaluated correctly.

    Issue with conditional statement

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working to improve the efficiency of some SQL Queries on SQL-Server-2008. There are
I am working on an ASP.NET website with sql server 2008 R2. i need
I'm working with SQL server 2008, and I want to create in my first
I'm working with EF 4.1 CTP5 and SQL Server 2008. I need to understand
I'm working with the filestream datatype for the first time (SQL Server 2008) and
I'm working on returning a recordset from SQL Server 2008 to do some pagination.
I am trying to put full text search working on SQL Server 2008, however
I'm working on a SQL Server 2008 database. This database has two tables. Book
I am working on a sql server 2008 DB and asp.net mvc web E-commerce
Scenario: My installation of SQL Server 2008 Web Edition SP1 was working properly. Since

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.