Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Conditional Split

Author  Topic 

sanrajesh
Starting Member

3 Posts

Posted - 2009-02-03 : 07:41:58
Hi,
I need to insert 48 rows (1/2 hour data) in a scheduler from the staging table to ODS table using SQL Server SSIS. The ODS table should be updated with only the latest 1/2 hour data and not be duplicated.
Source OLD DB - SQL Query to fetch "Period", Date, Sales
Look Up - SELECT PERIOD,DATE FROM FACT_DETAIL WHERE CONVERT(varchar(15),FACT_DATE,103)>CONVERT(varchar(15),GETDATE(),103)
Conditional Split - ISNULL(LookUp_FACT_DATE)
Destination OLD DB - Insert the latest record

The conditional split fails and all the records are inserted everytime when the package runs.

How to add only the latest rows in the ODS tables?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-03 : 09:51:10
which output have you connected to destination db?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-03 : 09:51:43
also see
http://www.sqlis.com/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx
Go to Top of Page
   

- Advertisement -