473,395 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Newby DTS Question

Hi,

I am trying to set up a DTS Package to transfer data from a remote
MySQL server to a local MS SQL database. The source tables will remain
static as will the destination however I only want to copy down data
that does not already exist in the local database.

I have two different methods of which to identify the new rows, on some
tables it is by a unique ID thus in TSQL I would say WHERE ID x.
Other tables are by date where I would want to do something like WHERE
CreateDate >= GetDate()-1

How would I go about performing such clauses using DTS?

Thanks

Mike

Jul 10 '06 #1
2 1354
mi********@hotmail.com wrote:
Hi,

I am trying to set up a DTS Package to transfer data from a remote
MySQL server to a local MS SQL database. The source tables will remain
static as will the destination however I only want to copy down data
that does not already exist in the local database.

I have two different methods of which to identify the new rows, on some
tables it is by a unique ID thus in TSQL I would say WHERE ID x.
Other tables are by date where I would want to do something like WHERE
CreateDate >= GetDate()-1

How would I go about performing such clauses using DTS?
Hi Mike,

Assuming that I am understanding you correctly... in your data pump you
should select "SQL Query" on the "Source" tab. Then fill in the query
using something like:

SELECT my_columns
FROM dbo.My_Table
WHERE id ?

The "?" tells DTS that you will supply it with this parameter. Now
click on the Parameters button and create a global variable to hold the
maximum ID value in your destination table. Now you just need to make
sure that the global variable gets filled *before* your data pump. You
can use the Dynamic Properties Task for this, with an "On Success"
workflow constraint between that and your data pump.

You may need to play with the dates a bit to make sure that you have
the right global variable data type/formats, etc.

HTH,
-Tom.

Jul 10 '06 #2
Thanks for your help Tom,worked a treat.

Thomas R. Hummel wrote:
mi********@hotmail.com wrote:
Hi,

I am trying to set up a DTS Package to transfer data from a remote
MySQL server to a local MS SQL database. The source tables will remain
static as will the destination however I only want to copy down data
that does not already exist in the local database.

I have two different methods of which to identify the new rows, on some
tables it is by a unique ID thus in TSQL I would say WHERE ID x.
Other tables are by date where I would want to do something like WHERE
CreateDate >= GetDate()-1

How would I go about performing such clauses using DTS?

Hi Mike,

Assuming that I am understanding you correctly... in your data pump you
should select "SQL Query" on the "Source" tab. Then fill in the query
using something like:

SELECT my_columns
FROM dbo.My_Table
WHERE id ?

The "?" tells DTS that you will supply it with this parameter. Now
click on the Parameters button and create a global variable to hold the
maximum ID value in your destination table. Now you just need to make
sure that the global variable gets filled *before* your data pump. You
can use the Dynamic Properties Task for this, with an "On Success"
workflow constraint between that and your data pump.

You may need to play with the dates a bit to make sure that you have
the right global variable data type/formats, etc.

HTH,
-Tom.
Jul 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Damien | last post by:
I have just built a simple stopwatch application, but when i f5 to get things goings i get this message, An unhandled exception of type 'System.ArithmeticException' occurred in...
0
by: Pete | last post by:
Hi All, A total Newby with, possibly, a daft question? However, until I can get a reasonable explanation I am disinclined towards going further. Here goes: I recently downloaded the latest...
8
by: Ask | last post by:
G'day All, Just thought I'd drop in and say hi. I'm new to Python, but old to software development. Python is one of the languages used in my new job, so I've just bought a book, read it, and...
10
by: Fred Nelson | last post by:
Hi: I have programmed in VB.NET for about a year and I'm in the process of learing C#. I'm really stuck on this question - and I know it's a "newby" question: In VB.NET I have several...
4
by: Fred Nelson | last post by:
I have an applicatioin that I'm writing that uses a "case" file that contains over 350 columns and more may be added in the future. I would like to create a dataset with all the column names and...
4
by: Fred Nelson | last post by:
Hi: I'm developing a web application that needs to have five values, each retrieved from cookies on many pages. If I have five "Request.Cookies" commands together does this cause five "round...
2
by: Fred Nelson | last post by:
Hi: I'm working on a VS2005 web application and I have what is probabably a "newby" question. In VS2003 I could drag a textbox/button/etc on to a form and position it with the mouse. I...
2
by: johnnyG | last post by:
Greetings, I'm studying for the 70-330 Exam using the MS Press book by Tony Northrup and there are 2 side-by-side examples of using the SHA1CryptoServiceProvider to create a hash value from a...
10
by: Charles Russell | last post by:
Why does this work from the python prompt, but fail from a script? How does one make it work from a script? #! /usr/bin/python import glob # following line works from python prompt; why not in...
5
by: alexrixhardson | last post by:
Hi guys, I am a newby in the C/C++ world, and I am beginning to work on a rather simple TCP/IP proxy application which must be able to handle large volume of data as quickly as possible. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.