Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date range for a DTS Package

Status
Not open for further replies.

safari7391

Programmer
Apr 29, 2003
33
US
SQL Server 2000
Enterprise Manager
DTS Package - Import

How to get the previous day of data from the SQL Statement? I would like use the [row_date] as my date range.

CREATE TABLE [SUP_EXC_Portal].[s53f].[dagent] (
[row_date] smalldatetime NULL,
[acd] smallint NULL,
[split] smallint NULL,
[extension] char (7) NULL,
[logid] char (10) NULL,
[loc_id] smallint NULL,
[ti_stafftime] int NULL,
[ti_auxtime] int NULL,
[acdcalls] smallint NULL,
[acdtime] int NULL,
[acwtime] int NULL,
)
 
Where would it go in this SQL Statement?

CREATE TABLE [SUP_EXC_Portal].[s53f].[dagent] (
[row_date] smalldatetime NULL,
[acd] smallint NULL,
[split] smallint NULL,
[extension] char (7) NULL,
[logid] char (10) NULL,
[loc_id] smallint NULL,
[ti_stafftime] int NULL,
[ti_auxtime] int NULL,
[acdcalls] smallint NULL,
[acdtime] int NULL,
[acwtime] int NULL,
)


 
You have to create a DataTransformation Task and write your SQL there.
 
I am not sure I completely understand what you are trying to do, but you can add a computed column to your table. This column will get dateadd(dd,-1,row_date) and will be in the table, on the same row.

"A long life is when each day is full and every hour wide!"
(A Jewish Mentor)
M. [hourglass]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top