none
Precedence constraint multiple expression in SSIS RRS feed

  • Question

  • Hello Everyone- 

    I have folder A with 100s of text files. Below is the naming convention

    ProviderName_ProviderID_PatientID_Datetimestamp.txt

    I already built a SSIS package, where i get the PatientIDs from Table and  match with the PatientID of the filename and move the files to Folder B. 

    Now my question is: 
    In the filename, if the ProviderID value is either 7 or 1 or 142 or 145, i dont want to move this files to Folder B. How can i write this expression or how can i update the expression in precedence constraint.
    . Thanks

    Wednesday, October 9, 2019 3:51 PM

Answers

  • Hi Mikee9,

    We can use the following codes in expression.

    TOKEN( @[User::FileName] , "_",2 )!="1"&& TOKEN( @[User::FileName] , "_",2 )!="7"&&TOKEN( @[User::FileName] , "_",2 )!="142"&&TOKEN( @[User::FileName] , "_",2 )!="145"

    Please refer to the similar issue which is answered.

    SSIS : Move file from one folder to other

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by ArthurZModerator Thursday, October 10, 2019 3:52 PM
    • Marked as answer by Mikee9 Friday, October 11, 2019 2:17 PM
    Thursday, October 10, 2019 1:38 AM

All replies

  • Hi Mikee9,

    We can use the following codes in expression.

    TOKEN( @[User::FileName] , "_",2 )!="1"&& TOKEN( @[User::FileName] , "_",2 )!="7"&&TOKEN( @[User::FileName] , "_",2 )!="142"&&TOKEN( @[User::FileName] , "_",2 )!="145"

    Please refer to the similar issue which is answered.

    SSIS : Move file from one folder to other

    Best Regards,

    Mona


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by ArthurZModerator Thursday, October 10, 2019 3:52 PM
    • Marked as answer by Mikee9 Friday, October 11, 2019 2:17 PM
    Thursday, October 10, 2019 1:38 AM
  • Thanks mona. 
    Friday, October 11, 2019 2:17 PM