Prev: SSIS Developer / CA
Next: Advice on replication
From: NZDeveloper on 1 Jul 2010 01:10 I have an expression in a view that calculates a date by adding a number of months using the dateadd function. I want to get both the datepart (m for month in my caase) and hte number (1-3 months) from other fields in my view. I've tried this DATEADD(dbo.tbl_PTDF_PreTreatDevFrequency.PTDF_DateAddInterval, - dbo.tbl_PTDF_PreTreatDevFrequency.PTDF_BaseUnit, dbo.VW_110_01_ChargePeriod.EWC_PeriodEndDate) but it bomb out with I try and run it with the following error: "dbo.tbl_PTDF_PreTreatDevFrequency.PTDF_DateAddInterval is not a valid dateadd option" The field dbo.tbl_PTDF_PreTreatDevFrequency.PTDF_DateAddInterval holds a text value of 'm' If I replace the datepart with m, it works, why cant I pass my value from dbo.tbl_PTDF_PreTreatDevFrequency.PTDF_DateAddInterval ? Thanks in advance Grant
|
Pages: 1 Prev: SSIS Developer / CA Next: Advice on replication |