![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
I am trying to set up a DTS package that extracts all of Yesterdays data. The code that I am using works great in a view by converting a DateTime stamp to just a short date, then displaying just the GetDate() -1 (i.e., yesterday). It does not work with DTS. Any help with this greatly appreciated. Here is the DTS Trans Script: Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) - 1) THEN DTSDestination("Type") = DTSSource("Type") DTSDestination("UnitID") = DTSSource("UnitID") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you RBolling |
#12
| |||
| |||
|
|
I am trying to set up a DTS package that extracts all of Yesterdays data. The code that I am using works great in a view by converting a DateTime stamp to just a short date, then displaying just the GetDate() -1 (i.e., yesterday). It does not work with DTS. Any help with this greatly appreciated. Here is the DTS Trans Script: Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) - 1) THEN DTSDestination("Type") = DTSSource("Type") DTSDestination("UnitID") = DTSSource("UnitID") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you RBolling |
#13
| |||
| |||
|
|
I am trying to set up a DTS package that extracts all of Yesterdays data. The code that I am using works great in a view by converting a DateTime stamp to just a short date, then displaying just the GetDate() -1 (i.e., yesterday). It does not work with DTS. Any help with this greatly appreciated. Here is the DTS Trans Script: Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) - 1) THEN DTSDestination("Type") = DTSSource("Type") DTSDestination("UnitID") = DTSSource("UnitID") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you RBolling |
#14
| |||
| |||
|
|
I am trying to set up a DTS package that extracts all of Yesterdays data. The code that I am using works great in a view by converting a DateTime stamp to just a short date, then displaying just the GetDate() -1 (i.e., yesterday). It does not work with DTS. Any help with this greatly appreciated. Here is the DTS Trans Script: Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) - 1) THEN DTSDestination("Type") = DTSSource("Type") DTSDestination("UnitID") = DTSSource("UnitID") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you RBolling |
#15
| |||
| |||
|
|
I am trying to set up a DTS package that extracts all of Yesterdays data. The code that I am using works great in a view by converting a DateTime stamp to just a short date, then displaying just the GetDate() -1 (i.e., yesterday). It does not work with DTS. Any help with this greatly appreciated. Here is the DTS Trans Script: Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) - 1) THEN DTSDestination("Type") = DTSSource("Type") DTSDestination("UnitID") = DTSSource("UnitID") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you RBolling |
#16
| |||
| |||
|
|
I am trying to set up a DTS package that extracts all of Yesterdays data. The code that I am using works great in a view by converting a DateTime stamp to just a short date, then displaying just the GetDate() -1 (i.e., yesterday). It does not work with DTS. Any help with this greatly appreciated. Here is the DTS Trans Script: Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) - 1) THEN DTSDestination("Type") = DTSSource("Type") DTSDestination("UnitID") = DTSSource("UnitID") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you RBolling |
#17
| |||
| |||
|
|
I am trying to set up a DTS package that extracts all of Yesterdays data. The code that I am using works great in a view by converting a DateTime stamp to just a short date, then displaying just the GetDate() -1 (i.e., yesterday). It does not work with DTS. Any help with this greatly appreciated. Here is the DTS Trans Script: Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) - 1) THEN DTSDestination("Type") = DTSSource("Type") DTSDestination("UnitID") = DTSSource("UnitID") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you RBolling |
![]() |
| Thread Tools | |
| Display Modes | |
| |