I want to use an xml path and assign the results to variables within an ssis package.
I keep getting errors that it will not assign the variable.
I am converting a flat table wihch has email addresses in one column to a more normalized structure (header/detail) so in my ssis routine i need to keep in place for every one customer email a list of recipients. the table works fine - but not normalized and I need to clean this up.
SELECT HDR.CUST_NUM ,HDR.CUST_NAME
asked Feb 12 '11 at 01:52 PM in Default
I got it - you have to convert to varchar
Convert(varchar(1000), STUFF((SELECT ';'+ dtl.EM_ADDRESS FROM DEV_USR.dbo.T_OS_WEEKLY_RPT_DIST AS dtl WHERE dtl.EM_TYP = 'BCC' AND dtl.CUST_NUM = HDR.CUST_NUM FOR XML PATH('')),1,1,''))as [BCC]
answered Feb 13 '11 at 09:37 PM