Hi
I have created a small table with these columns:
/****** Script for SelectTopNRows command from SSMS ******/
SELECT [ProductName]
,[ProductCode]
,[ProductCountry]
,[ProductType]
,[SubCarrierID]
,[SubCarrierName]
,[ProductStatus]
,[StartDate]
,[EndDate]
,[MultiColli]
,[AvailableOnAPI]
,[ShopProduct]
,[Direction]
,[id]
FROM [MasterData].[Products]
ID is PK and has identity 1.
If ProductCode exist then its an update on that row.
If it does not, then its new and should be inserted.
How do i define my output to that?
This keeps adding as new :\
Solved! Go to Solution.
@Hamder83
Did you look at the mapping if everything is correct in the Append Field Map option?
If there is no other PK in the BD
and the pk and identity 1 field should not work
If you don't pass the ID Null to the update it will insert and not update
There will be 'Key for Update' field when the option 'Update:Insert if new' selected to select the update column, try checking for this option
oh, I didnt have that option of using oledb. I changed it to odbc and it worked.
Thank you :-)