SSIS Dynamic regular expression

  • Can somebody tell me whats wrong with the regular expression given below:

    ="SELECT DISTINCT

    pat_id,

    TO_CHAR(pat_uid) AS pat_uid,

    hmo,

    member_number,

    CONCAT(substr(date_of_birth, 1, 2), CONCAT(substr(date_of_birth, 4, 2), substr(date_of_birth, 7, 4))) AS date_of_birth, last_name,

    CONCAT(CONCAT(first_name, ' '), middle_initial) AS first_name,

    CASE

    WHEN REGION_HMOA = 'EAS' THEN '94294'

    WHEN REGION_HMOA = 'SF' THEN '94294499'

    WHEN REGION_HMOA = 'SOL' THEN '94294696'

    WHEN REGION_HMOA = 'SAC' THEN '94294497'

    ELSE '94294489699'

    END AS Medical_Group_id,

    CASE

    WHEN hmo = 'BS' THEN '002'

    WHEN hmo = 'WH' THEN '027'

    WHEN hmo = 'CC' THEN '016'

    WHEN hmo = 'CG' THEN '022'

    WHEN hmo = 'PC' THEN '012'

    WHEN hmo = 'AE' THEN '020'

    WHEN hmo = 'HN' THEN '007'

    WHEN hmo = 'HA' THEN '027'

    WHEN hmo = 'SN' THEN '018'

    END AS health_plan_id

    FROM XYZ_TABLE where HMO = "+ @[User::Health_Plan_ID] + "ORDER BY pat_uid"

    I am getting an error:

    The equal sign (=) at line number "0", was not expected. A double sign (==) may be required at the location specified.

    Thank you!!

  • You will need to cast your variable to String if it is any other data type, because you are building a string object here. You may also have to ensure that there is a space before the "ORDER BY" to separate that from the where clause predicate.

  • Thanks for replying mate..The variable type is String only..and an extra space before Order by is not helping.. 🙁

  • The root cause of the problem was equal to sign provided before the expression..I removed that sign..and the error was gone..

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply