![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello Everyone. I basically want to do an insert. Here's my insert script which works when the database is empty. In the destination table i created another index (siteid). ' Copy each source column to the destination column Function Main() DTSDestination("wexchid") = DTSSource("exchid") DTSDestination("wexTitle") = DTSSource("exTitle") DTSDestination("wexSku") = DTSSource("exSku") DTSDestination("wexDescription") = DTSSource("exDescription") DTSDestination("wexPrice") = DTSSource("exPrice") DTSDestination("wexPrice2") = DTSSource("exPrice2") Main = DTSTransformStat_InsertQuery End Function I don't know how to check if the DTSDestination("wexSku") exist. If it does exist then skip that row during an insert. If i was writing this in normal asp then it won't be an issue but i'm struggling here. Would it be just to write someting like this If (DTSLookups("skuCHECK").Execute(DTSSource("wexSku" ))) Then Main = DTSTransformStat_InsertQuery End If My lookup checks the destination table and then matches it with the source. I need some help here. Thank you April |
#3
| |||
| |||
|
|
Yep you can certainly do that. Have you thought about linked servers? Allan |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
I'm having a syntax error day here...any suggestions. ' Copy each source column to the destination column Function Main() DTSDestination("wexchid") = DTSSource("exchid") DTSDestination("wexTitle") = DTSSource("exTitle") DTSDestination("wexSku") = DTSSource("exSku") DTSDestination("wexDescription") = DTSSource("exDescription") DTSDestination("wexPrice") = DTSSource("exPrice") DTSDestination("wexPrice2") = DTSSource("exPrice2") If (DTSLookups("skuCHECK").Execute(DTSSource("exSku") )) Then Main = DTSTransformStat_InsertQuery End If End Function The lookup is set to check the destination against the source. I guess this is where my problems lies. If "what goes in here" (DTSLookups("skuCHECK").Execute(DTSSource("exSku") )) Then I'm stuck any help would be appreciated. April |
![]() |
| Thread Tools | |
| Display Modes | |
| |