Im trying to create a package that runs a script and gets the count of records on a table and then have that emailed to me daily.however I keep receiving a error about the datatype(shouldn't a COUNT return INT datatype?). My sql task result variable(sg_agt_m1_Count)is set as int32. and then in my email task I'm creating a expression for the 'MessageSource' with the following: "Postgres Table Import Quality Assurance Daily Statistics "+ Replace((DT_WSTR,15)(DT_DBDATE) DATEADD( "d", -0, GETDATE())," ","") + "CMSForte Load Stats " + "------------------------" +" Table "+" CMSForte.dbo.sg_agt_m1 :"
however I'm receiving the following error:"The data types "DT_WSTR" and "DT_14" are incompatible for binary operator "+". The operand types could not be implicitly cast into compatible types for the operation. To perform this operation, one or both operands need to be explicitly cast with a operator.Attempt to set the result type of binary operation ""Postgres Table Import Quality Assurance Daily Statistics " + REPLACE((DT_WSTR,15)(DT_DBDATE)DATEADD("d",-0,GETDATE())," ",'')+"CMSForte Load Stats"+"-----------------------"+" Table "+"CMSForte.dbo.sg_agt_m1 :"+ @[User::sg_agt_m1_Count]" failed with error code 0xC0047080.
Any help would be much appreciated