4

I have seen this question and I tried what it suggested, but without any success (see Attempt 1 below).

I have tried the below conditions in my Conditional Split without success. I have checked that records exist prior to the conditional split that fit the criteria so I should be getting data from the conditional split, but I am not getting any data. I also verified that the other two conditions are working correctly independently of the GUID comparison.

I tried many way to achieve this without success:

Attempt 1:

CompanyGUIDString = (DT_WSTR,50)CompanyID  // In Derived Column

// Conditional Split Condition
ISNULL(AssociationID) ==  FALSE  && ccseq_associationtype == 2 && CompanyGUIDString == "7C46BB0B-AEF3-E611-80E0-005056B33317" 

Attempt 2:

ISNULL(AssociationID) ==  FALSE  && ccseq_associationtype == 2 && CompanyID == "7C46BB0B-AEF3-E611-80E0-005056B33317" 

Attempt 3:

ISNULL(AssociationID) ==  FALSE  && ccseq_associationtype == 2 && (DT_WSTR, 50) CompanyID == (DT_WSTR,50) "7C46BB0B-AEF3-E611-80E0-005056B33317" 

Attempt 4:

ISNULL(AssociationID) ==  FALSE  && ccseq_associationtype == 2 && (DT_STR, 50, 1252) CompanyID == (DT_STR, 50, 1252) "7C46BB0B-AEF3-E611-80E0-005056B33317"

Attempt 5:

ISNULL(AssociationID) ==  FALSE  && ccseq_associationtype == 2 && (DT_GUID) CompanyID == (DT_GUID) "7C46BB0B-AEF3-E611-80E0-005056B33317"  
Community
  • 1
  • 1
Tim Hutchison
  • 3,483
  • 9
  • 40
  • 76
  • Have you tried deleting other conditions and checking only with: CompanyGUIDString == "7C46BB0B-AEF3-E611-80E0-005056B33317" ? Its always better to add joint conditions one by one to see which one cases the issue. – TheEsnSiavashi Apr 20 '17 at 18:47
  • @TheEsisia I have tried that and I get no records – Tim Hutchison Apr 20 '17 at 18:50
  • Two ways to make sure that the record is actually coming into the Conditional Split. 1. Filter the source in the OLE DB Source or whatever you are using to get only that specific row. Just use a WHERE clause for that specific guid. 2. Use a data viewer. – TheEsnSiavashi Apr 20 '17 at 19:19

2 Answers2

5

I discovered the answer. When you convert a GUID to a String, the cast adds "{}" to the GUID. The code below will work correctly.

(ISNULL(AssociationID) ==  FALSE ) && (ccseq_associationtype == 2) && (UPPER((DT_WSTR,50)CompanyID) == UPPER((DT_WSTR,50)"{7C46BB0B-AEF3-E611-80E0-005056B33317}"))
Tim Hutchison
  • 3,483
  • 9
  • 40
  • 76
1

Your expression looks fine, but note thay SSIS expressions are case sensitive, Just add parenthesis and use UPPER() function

(ISNULL(AssociationID) ==  FALSE)  &&
([ccseq_associationtype] == 2) && 
(UPPER((DT_WSTR, 50)[CompanyGUIDString]) == UPPER("7C46BB0B-AEF3-E611-80E0-005056B33317"))
Hadi
  • 36,233
  • 13
  • 65
  • 124