![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 |
#5
| |||
| |||
|
|
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 |
#6
| |||
| |||
|
|
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 |
#7
| |||
| |||
|
|
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 |
#8
| |||
| |||
|
|
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 |
#9
| |||
| |||
|
|
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 |
#10
| |||
| |||
|
|
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 | |
| |