You are here: Re: Newby DTS Question « MsSQL Server « IT news, forums, messages
Re: Newby DTS Question

Posted by mike_kilby@hotmail.com on 11/29/02 11:52

Thanks for your help Tom,worked a treat.



Thomas R. Hummel wrote:

> mike_kilby@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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация