I have got file Data like this
Val type
7000 Main
7000.1 Spouse
7000.2 Child
7000.3 Child
7000.4 Child
8000 main
8000.1 Spouse
In Sql I have written Case Condition
Select CASE WHEN SUBSTRING(val,CHARINDEX('.',val))= 0 THEN 'main'
CASE WHEN SUBSTRING(val,CHARINDEX('.',val))= 1 THEN 'Spouse'
ELSE 'Child'
So it will give Main for not having Decimal values and 1 for Spouse and Rest are child But how can I write the same condition for Derived Column in SSIS package
我认为是这样的。
FINDSTRING(val,".",1) == NULL(DT_WSTR,10) ? "Main" : SUBSTRING(val,FINDSTRING(val,".",1)+1,1) == "1" ? "Spouse" : "Child"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.