![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to extract data from a table based on Today's Date using DTS. This job will run nightly and pull data from the five fields mentioned for that day and move it to another sql database on a different server. I'm not a programmer and am having difficulty getting it to grab the data. I have been able to do this in the past and it worked, but now it does not. When I take out the "where" statement, it pulls all data. I only need data for today. If anyone has any advice on any modifications on the script below, i would appreciate it. SELECT AccountName, TrxEndTime, TotalPieces, TotalChargedwithsurcharges, UserDefinedField FROM [mntrans].[dbo].[vwTransactiondataForCustomReports] WHERE TrxEndTime=dateadd (day, DATEDIFF (day, 0, getdate() ), 0) AND TrxEndTime < DATEADD (day, DATEDIFF (day, 0, getdate() ), 1) ORDER BY AccountName, TrxEndTime, TotalPieces, TotalChargedwithsurcharges, UserDefinedField |
![]() |
| Thread Tools | |
| Display Modes | |
| |