February 9, 2010 at 1:17 pm
hi ,
Pls help me to create DTS package ..
I have report in excel sheet .. i want to copy the data to a table
while copying the data i want to check whether the one column name Family_ID exists in the existing DB table .. if yes ... then that row need to be updated .. If not exists ... the row need to be inserted
Please help me or guide me to create a package ..
I don't have much idea on creating packages ..please help me ...
February 9, 2010 at 9:57 pm
Some one please reply ... The DTS Package Please step by step
February 9, 2010 at 10:13 pm
hi ,
Pls help me to create DTS package ..
I have report in excel sheet .. i want to copy the data to a table
while copying the data i want to check whether the one column name Family_ID exists in the existing DB table .. if yes ... then that row need to be updated .. If not exists ... the row need to be inserted
Please help me or guide me to create a package ..
I don't have much idea on creating packages ..please help me ...
Edited: Today @ 4:56:46 AM by John Paul-702936
February 10, 2010 at 10:46 pm
Hi Dude,
in server 2000,we have excel 97-2000 tranformation is there...
Go to that that transformation ,select file location
then drag and drop database transformation,in this transformation,give the ur database name
and link to this two transformations
in this link ...goto properties select source and destination
u have anthoer transformation execute sql stmt..in that one write the
query
IF EXISTS(SELECT *
FROM Production.Product
WHERE ProductNumber = @ProductNumber)
UPDATE Production.Product
SET NAME = @ProductName, StandardCost = @StdCost
WHERE ProductNumber = @ProductNumber
ELSE
INSERT INTO Production.Product
(Name, ProductNumber, StandardCost)
SELECT @ProductName
,@ProductNumber
,@StdCost
and the DTS
Thanks,
Pathiapti
February 12, 2010 at 9:26 am
Hi .. Thanks for reply ... But the thing is i have to Update the MAIN table from the Temp table Which is records updated from the CSV ..
So the Work Flow will be
Transfrom the CVS all the records to Temp table
- from temp table to main table
(this transformation need to check the . whether the Record is in MAIN table or not .. I mean complete Record not like single column ..
then if not the record need to be Inserted .. or else .. need to update the record ..)
I have come with some idea may be this is stupid Correct me if i am wrong
Delete all the records from Main table which record are in Temp Table
Then Insert all the TEMP records to the main Table ..
Here I Struck with the DELETING THING ....
I want to Delete all the Records from MAIN Table which are Same as in TEST table ...
Can you .. please .. Help me ..
Thanks
John
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply