Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selective DTS Import
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Divers
Thread ID:
00591479
Message ID:
00592130
Vues:
21
This message has been marked as the solution to the initial question of the thread.
OK, I guess I misunderstood the question. There would be two ways that I can think of to go about this:

1) Bring the data into a temporary SQL Server table and run the necessary T-SQL to prevent duplicates in subsequent step of the same package.

2) Add the VFP source as a linked server to run a distributed query. Distributed queries would let you specify the linked VFP data source as just another SQL Server source. See more info about linking VFP data in MSKB http://support.microsoft.com/default.aspx?scid=kb;EN-US;q199131 or http://support.microsoft.com/default.aspx?scid=kb;EN-US;q207595

HTH

>Sorry, I guess I'm not being clear. I'm trying to add data to an existing table. The problem is the source (which I have no control over) sometimes has data in it that has already been imported. Not a complete duplicate, just some of the records. I have a DTS package that works, except the duplicates are getting in and then I have to run another script to delete them. I CAN do this, but thought DTS ought to be able to keep them out in the first place.
>
>Does that make sense?
>
>>What I sometimes do in this cases is that I create the tables that will be populated in the initial step and that gives me a list of fields in the destination tab and also on the transformation tab. You can either recreate it each time or just TRUNCATE it. The query will give you a list of fields that you can connect to the destination. HTH
>>
>>>Hi
>>>
>>>I am using the DTS designer.
>>>I am able to be selective in the Source Query, but I can't see how to reference the Destination there. (I don't think I can)
>>>When I look at the Destination, I see options to load or create a table.
>>>The Transformation tab doesn't seem to have what I need either.
>>>I think I need to use the Lookup, but I'm not sure how to do that. I've been looking through BOL and haven't figured it out yet.
>>>
>>>What do you think? Is Lookup where I need to focus? Or am I trying something DTS isn't designed for ?
>>>
>>>TIA,
>>>
>>>
>>>>>
>>>>>I'm new to DTS and am stuck. I have data in a free Fox table and am importing into a SQL7 table. The import works fine, except sometimes there is data in the Fox table that is a duplicate of what was already imported. Not the whole table, just some records.
>>>>>
>>>>>If this was T-Sql I'd write something like
>>>>>INSERT INTO Dest
>>>>>SELECT Src.Fields FROM Src
>>>>>WHERE NOT EXISTS (SELECT * FROM Dest WHERE Dest.Field1 = Src.Field1 AND Dest.Field2 = Src.Field2)
>>>>>
>>>>>With DTS, I'm not sure how to accomplish this.
>>>>>Any ideas welcome!
>>>>>TIA,
>>>>
>>>>Are you using the DTS wizard or the DTS designer?
>>>>
>>>>At some point in the wizard you will get asked if you want to transfer tables or if you want to use a query for the source. Here you select the query option and write the part that extracts the data from the source. In the subsequent steps you will specify where you want to put the resulting query.
>>>>
>>>>If using the DTS designer things are not much different, only that you need to specify the connections and then create a transformation type task where you specify the source query, the destination query and the correspondence in a more manual fashion.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform