October 5, 2012 at 2:47 am
Audit table:
CREATE TABLE [dbo].[AUDIT_RECORD](
[FILENAME] [varchar](100) NULL,
[LOAD_DATE] [datetime] NULL
)
Insert into [dbo].[AUDIT_RECORD] values('Sample',12/09/2012)
Insert into [dbo].[AUDIT_RECORD] values('Sample',13/09/2012)
----------------------------------------------------
DB Table:
CREATE TABLE [dbo].[Sample1](
[pKey] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[SasId] [nvarchar](max) NULL,
[Name] [nvarchar](max) NULL,
[TypeId] [nvarchar](max) NULL,
[UserName] [nvarchar](max) NULL,
[SysCreatedDateTime] [datetime] NULL,
[CompletedDateTime] [datetime] NULL,
[Boolean] [bit] NULL,
)
insert into Sample1 values('sdf','werwer','s233','xzfdsdf',12/11/2011,14/11/2011,'TRUE')
----------------------------------------
Ques:
Have a table “Sample1” and one of the columns is “SysCreatedDateTime”
Need to transfer the records from a table(Sample1) to another table(Sample2) based on the below condition
Condition:
Sample.SysCreatedDateTime > [dbo].[AUDIT_RECORD].MAX(LOAD_DATE)
How will we do this using SSIS 2005?
Regards
Sql
October 5, 2012 at 3:10 am
sqlstud (10/5/2012)
...How will we do this using SSIS 2005?
Regards
Sql
SSIS is a bit overkill for this.
INSERT INTO ...
SELECT... FROM ... WHERE ...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 5, 2012 at 3:26 am
you can use execute sql script task and there you write one script of select * into...
October 10, 2012 at 12:30 am
Thanks Chris and Div
Regards
Sqlstud
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply