Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
| Search | Today's Posts | Mark Forums Read
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 28th, 2004, 11:43 PM
Friend of Wrox
 
Join Date: Feb 2004
Location: Bangalore, Karnataka, India.
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retrieve only updated or changed records

Hi
    I have a table in my DB and I am loading that table from the remote datasource every morning thru DTS package and I want to change that logic such that every morning it will pull only modified records and I load only modified records to table.

Please help me in this, I cannot do a replication because my programs wants that via DTS. Pleas help thanks.

It is not how much we do,
but how much love we put in the doing.

-Mother Theresa
__________________
It is not how much we do,
but how much love we put in the doing.

-Mother Theresa
  #2 (permalink)  
Old November 1st, 2004, 08:18 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

You can use a query to compare the records that do not exist in one table and copy it to another
example:
[code]select * from tableA
 where not exists (select * from tableB code]

or you can set a flag in the table 1 or 0 when a new records is added and only copy those records. when you copy the records reset the flag.

Code:
update tableA
set updated = 0
 where not exists (select B.customerid from tableB as  B where B.customerid=TableA.customerid)

Jaime E. Maccou
Applications Analyst
  #3 (permalink)  
Old November 4th, 2004, 06:55 AM
Friend of Wrox
 
Join Date: Feb 2004
Location: Bangalore, Karnataka, India.
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am retrieving a record from the source and I have no control over that, Is there any mechanism in SQLServer like what we have in Oracle called "Materialized Views" which created will give only the updated or changed records?


It is not how much we do,
but how much love we put in the doing.

-Mother Theresa
  #4 (permalink)  
Old November 4th, 2004, 10:55 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Is there a datetime column or flag field you can identify the modified column?

Jaime E. Maccou
Applications Analyst


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve records from 2 tables snufse SQL Server 2000 7 January 29th, 2008 04:31 AM
Query to retrieve the first 10 records inserted anup_daware Oracle ASP 0 August 6th, 2007 01:50 AM
Retrieve SOME records jaywhy13 Classic ASP Basics 1 January 31st, 2005 12:50 AM
controls, any updated? skinny Access 2 December 31st, 2004 09:13 AM
JSP With Multiple records being added,updated, etc ess_stegra JSP Basics 3 December 1st, 2004 09:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.