Error in precedence Constraint Expression

  • Hi,

    Am new to ssis i given the below condition in constraint expression it show error help any body

    convert(date,getdate(),111)=convert(date,dateadd(dd,-1,DATEADD(wk,DATEDIFF(wk,0,dateadd(dd,7-datepart(day,DATEADD(qq, DATEDIFF(qq,0,getdate()), 0)),DATEADD(qq, DATEDIFF(qq,0,getdate()), 0))), 0)),111)

    Error is:

    Error at Constraint 5: The expression contains unrecognized token "date". If "date" is a variable, it should be expressed as "@date". The specified token is not valid. If the token is intended to be a variable name, it should be prefixed with the @ symbol.

    Error at Constraint 5: Attempt to parse the expression "convert(date,getdate(),111)=convert(date,dateadd(dd,-1,DATEADD(wk,DATEDIFF(wk,0,dateadd(dd,7-datepart(day,DATEADD(qq, DATEDIFF(qq,0,getdate()), 0)),DATEADD(qq, DATEDIFF(qq,0,getdate()), 0))), 0)),111)" failed and returned error code 0xC00470A4. The expression cannot be parsed. It might contain invalid elements or it might not be well-formed. There may also be an out-of-memory error.

  • I see a couple of issues here. variable User::date has to be used in expression as @date. there is no convert function at all.

    I am not sure as to what are you trying to evaluate. Might be more helpful if you gave more information.

    -Praveena

Viewing 2 posts - 1 through 1 (of 1 total)

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